Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
PATCH 1/1 Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
From: Yash Shah <[email protected]>
Fixed code indentation warning as detected by checkpatch.pl.
--- drivers/staging/rts5208/ms.c | 5 ++--- drivers/staging/rts5208/sd.c | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-)
drivers/staging/rts5208/ms.c +2 -3
@@ -1121,11 +1121,10 @@ static int ms_read_attribute_info(struct rtsx_chip *chip)#ifdef SUPPORT_MSXC if ((buf[cur_addr_off +8 ] ==0x10 ) || - (buf[cur_addr_off + 8] == 0x13)) + (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) |
drivers/staging/rts5208/sd.c +4 -6
@@ -246,11 +246,10 @@ RTY_SEND_CMD: } }#ifdef SUPPORT_SD_LOCK - if (ptr[1] & 0x7D) +if (ptr[1 ] &0x7D ) {#else - if (ptr[1] & 0x7F) +if (ptr[1 ] &0x7F ) {#endif - {dev_dbg (rtsx_dev (chip),"ptr[1]: 0x%02x\n" , ptr[1 ]);rtsx_trace (chip);
@@ -4148,11 +4147,10 @@ RTY_SEND_CMD: } }#ifdef SUPPORT_SD_LOCK -if (ptr[1 ] &0x7D ) +if (ptr[1 ] &0x7D ) {#else - if (ptr[1] & 0x7F) +if (ptr[1 ] &0x7F ) {#endif - {rtsx_trace (chip);return STATUS_FAIL ; }
Signature · 1 line
1.9.1
Quoted 5 lines · Yash (Y.)
From: Yash Shah <[email protected]>
Fixed code indentation warning as detected by checkpatch.pl.
Signed-off-by Yash Shah <[email protected]>
Defines aren't allowed in .c files anyway.
regards,
dan carpenter
Quoted 8 lines · Dan Carpenter
Quoted 5 lines · Yash (Y.)
From: Yash Shah <[email protected]>
Fixed code indentation warning as detected by checkpatch.pl.
Signed-off-by Yash Shah <[email protected]>Defines aren't allowed in .c files anyway.
The kernel source tree disagrees with you
$ git grep "^\s*#\s*define\b" -- "*.c" | wc -l 175830
Quoted 6 lines · Joe Perches
Quoted 5 lines · Dan Carpenter
Quoted 4 lines · Yash (Y.)
From: Yash Shah <[email protected]>
Fixed code indentation warning as detected by checkpatch.pl.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Yash Shah <[email protected]>Defines aren't allowed in .c files anyway.
The kernel source tree disagrees with you
$ git grep "^\s*#\s*define\b" -- "*.c" | wc -l 175830
Duh. Sorry. I meant ifdefs. I'm sure you can find lots of examples of those too, but this code would be cleaner without the ifdefs.
regards,
dan carpenter
Quoted 11 lines · Dan Carpenter
Quoted 10 lines · Joe Perches
Quoted 8 lines · Dan Carpenter
Quoted 5 lines · Yash (Y.)
From: Yash Shah <[email protected]>
Fixed code indentation warning as detected by checkpatch.pl.
Signed-off-by Yash Shah <[email protected]>Defines aren't allowed in .c files anyway.
Quoted 7 lines
Quoted 4 lines
The kernel source tree disagrees with you
$ git grep "^\s*#\s*define\b" -- "*.c" | wc -l 175830Duh. Sorry. I meant ifdefs. I'm sure you can find lots of examples of those too,
Yeah, no worries, only about 30k of those.
Quoted 1 line
but this code would be cleaner without the ifdefs.
Very true. Removing these would be good.