Skip to contentSkip to conversation

staging: rts5208: ensure braces on all arms of if stmt

PATCH In review Nicholas Sim 2 participants 2 messages Apr 5, 2016 – Apr 6, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rts5208: ensure braces on all arms of if stmt

Added braces on if arm of if statement where else arm already needs braces as suggested for clarity in Documentation/CodingStyle

---
 drivers/staging/rts5208/ms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/ms.c +2 -1
index 3e75db7..2ad4ea0 100644
@@ -794,8 +794,9 @@ static int ms_confirm_cpu_startup(struct rtsx_chip *chip)
 	}
 
 	if (val & INT_REG_ERR) {
-		if (val & INT_REG_CMDNK)
+		if (val & INT_REG_CMDNK) {
 			chip->card_wp |= (MS_CARD);
+		}
 		else {
 			rtsx_trace(chip);
 			return STATUS_FAIL;
Signature · 1 line
2.4.3
#1 lore raw
Quoted 13 lines · Nicholas Sim

Added braces on if arm of if statement where else arm already needs braces as suggested for clarity in Documentation/CodingStyle

---
 drivers/staging/rts5208/ms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rts5208/ms.c +0 -0
index 3e75db7..2ad4ea0 100644

drivers/staging/rts5208/ms.c static int ms_confirm_cpu_startup(struct rtsx_chip *chip) · line 800

Quoted 8 lines
drivers/staging/rts5208/ms.c +2 -1
@@ -794,8 +794,9 @@ static int ms_confirm_cpu_startup(struct rtsx_chip *chip)
 	}
 
 	if (val & INT_REG_ERR) {
-		if (val & INT_REG_CMDNK)
+		if (val & INT_REG_CMDNK) {
 			chip->card_wp |= (MS_CARD);
+		}
 		else {

It should be } else { on one line.

regards,
dan carpenter
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel