]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / battery: get rid of negations in conditions
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Tue, 24 Jul 2018 11:27:34 +0000 (14:27 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Jul 2018 11:41:52 +0000 (13:41 +0200)
commit8d1b4e6caf6cc02551acb9e03b6dd8eefb941a2f
treee4c651556606981d1a213cac27f0aad7ed63de53
parent5849cd1e9601dec761e077b34b2be7e5c9bb1db2
ACPI / battery: get rid of negations in conditions

Simple conditions without negations inflict less cognitive load
on readers.

Rework conditional branches not to use negations. Also add braces
around single statement branches where their counterpart else-branches
consist of more than one statement as suggested in the paragraph 3 of
the coding style.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/battery.c