]> asedeno.scripts.mit.edu Git - linux.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)
commit2754435d4c820875412785da9bfa017a74fe51a7
treee4c651556606981d1a213cac27f0aad7ed63de53
parentdd1fca9e6cd4c5c179f4e854ceddbc22890109ce
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