Skip to contentSkip to conversation

Staging: rts5208: Fix if-else brace indent

PATCH In review Amitoj Kaur Chawla 2 participants 2 messages Mar 30, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rts5208: Fix if-else brace indent

Fixed brace '{' position after if header. Problem found using checkpatch.pl
WARNING: suspect code indent for conditional statements (16, 16)

---
 drivers/staging/rts5208/ms.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rts5208/ms.c +1 -2
index 4c38ff9..a8515d0 100644
@@ -914,9 +914,8 @@ static int ms_read_attribute_info(struct rtsx_chip *chip)
 		if ((buf[cur_addr_off + 8] == 0x10) ||
 			(buf[cur_addr_off + 8] == 0x13))
 #else
-		if (buf[cur_addr_off + 8] == 0x10)
+		if (buf[cur_addr_off + 8] == 0x10) {
 #endif
-		{
 			sys_info_addr = ((u32)buf[cur_addr_off + 0] << 24) |
 				((u32)buf[cur_addr_off + 1] << 16) |
 				((u32)buf[cur_addr_off + 2] << 8) |
Signature · 1 line
1.9.1
#1 lore raw
Quoted 13 lines · Amitoj Kaur Chawla

Fixed brace '{' position after if header. Problem found using checkpatch.pl
WARNING: suspect code indent for conditional statements (16, 16)

---
 drivers/staging/rts5208/ms.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rts5208/ms.c +0 -0
index 4c38ff9..a8515d0 100644

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

Quoted 7 lines
drivers/staging/rts5208/ms.c +1 -2
@@ -914,9 +914,8 @@ static int ms_read_attribute_info(struct rtsx_chip *chip)
 		if ((buf[cur_addr_off + 8] == 0x10) ||
 			(buf[cur_addr_off + 8] == 0x13))
 #else
-		if (buf[cur_addr_off + 8] == 0x10)
+		if (buf[cur_addr_off + 8] == 0x10) {
 #endif
-		{

Are you sure this is correct? The { has moved from outside an ifdef into an ifdef branch.

julia

Quoted 13 lines
drivers/staging/rts5208/ms.c +0 -0
 			sys_info_addr = ((u32)buf[cur_addr_off + 0] << 24) |
 				((u32)buf[cur_addr_off + 1] << 16) |
 				((u32)buf[cur_addr_off + 2] << 8) |
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150330173952.GA32369%40amitoj-Inspiron-3542.
For more options, visit https://groups.google.com/d/optout.