[PATCH 07/11] driver: thinkpad_acpi: remove not necessary {} braces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit fixes the "braces {} are not necessary for any arm of this
statement" checkpatch warning.

Signed-off-by: Konrad Zapalowicz <bergo.torino@xxxxxxxxx>
---
 drivers/platform/x86/thinkpad_acpi.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 940f83b..eba72e7 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5013,11 +5013,11 @@ static int light_write(char *buf)
 		return -ENODEV;
 
 	while ((cmd = next_cmd(&buf))) {
-		if (strlencmp(cmd, "on") == 0) {
+		if (strlencmp(cmd, "on") == 0)
 			newstatus = 1;
-		} else if (strlencmp(cmd, "off") == 0) {
+		else if (strlencmp(cmd, "off") == 0)
 			newstatus = 0;
-		} else
+		else
 			return -EINVAL;
 	}
 
@@ -5527,15 +5527,14 @@ static int led_write(char *buf)
 				tpacpi_leds[led].led < 0)
 			return -ENODEV;
 
-		if (strstr(cmd, "off")) {
+		if (strstr(cmd, "off"))
 			s = TPACPI_LED_OFF;
-		} else if (strstr(cmd, "on")) {
+		else if (strstr(cmd, "on"))
 			s = TPACPI_LED_ON;
-		} else if (strstr(cmd, "blink")) {
+		else if (strstr(cmd, "blink"))
 			s = TPACPI_LED_BLINK;
-		} else {
+		else
 			return -EINVAL;
-		}
 
 		rc = led_set_status(led, s);
 		if (rc < 0)
@@ -7878,11 +7877,11 @@ static ssize_t fan_pwm1_enable_show(struct device *dev,
 	if (res)
 		return res;
 
-	if (status & TP_EC_FAN_FULLSPEED) {
+	if (status & TP_EC_FAN_FULLSPEED)
 		mode = 0;
-	} else if (status & TP_EC_FAN_AUTO) {
+	else if (status & TP_EC_FAN_AUTO)
 		mode = 2;
-	} else
+	else
 		mode = 1;
 
 	return snprintf(buf, PAGE_SIZE, "%d\n", mode);
-- 
1.8.1.2


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel




[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux