staging: rtl8723bs: Remove unnecessary braces for single statements
PATCH 1/1 staging: rtl8723bs: Remove unnecessary braces for single statements
Clean up unnecessary braces around single statement blocks. Issues reported by checkpatch.pl as:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by Simran Singhal <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +3 -6
@@ -43,9 +43,8 @@ Efuse_Read1ByteFromFakeContent( u16 Offset, u8 *Value) { -if (Offset >=EFUSE_MAX_HW_SIZE ) { +if (Offset >=EFUSE_MAX_HW_SIZE )return false; - }/* DbgPrint("Read fake content, offset = %d\n", Offset); */ if (fakeEfuseBank ==0 ) *Value = fakeEfuseContent[Offset];
@@ -65,14 +64,12 @@ Efuse_Write1ByteToFakeContent( u16 Offset, u8 Value) { -if (Offset >=EFUSE_MAX_HW_SIZE ) { +if (Offset >=EFUSE_MAX_HW_SIZE )return false; - }if (fakeEfuseBank ==0 ) fakeEfuseContent[Offset] = Value; -else { +else fakeBTEfuseContent[fakeEfuseBank-1 ][Offset] = Value; - }return true; }
Signature · 1 line
2.17.1
Quoted 14 lines · On Wed, 25 Mar 2020 19:32:45 +0530 Simran Singhal <[email protected]>…
Clean up unnecessary braces around single statement blocks. Issues reported by checkpatch.pl as:
WARNING: braces {} are not necessary for single statement blocksSigned-off-by Simran Singhal <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)drivers/staging/rtl8723bs/core/rtw_efuse.c +0
-0
drivers/staging/rtl8723bs/core/rtw_efuse.c Efuse_Read1ByteFromFakeContent( · line 48
Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_efuse.c +1
-2@@ -43,9 +43,8 @@ Efuse_Read1ByteFromFakeContent( u16 Offset, u8 *Value) { -if (Offset >=EFUSE_MAX_HW_SIZE ) { +if (Offset >=EFUSE_MAX_HW_SIZE )return false; - }/* DbgPrint("Read fake content, offset = %d\n", Offset); */
I find the resulting version a bit confusing:
if (Offset >= EFUSE_MAX_HW_SIZE)
return false;
/* DbgPrint("Read fake content, offset = %d\n", Offset); */
if (fakeEfuseBank == 0)
*Value = fakeEfuseContent[Offset];The check on "Offset" isn't separated in any way by the following logic. I would suggest that you replace the closing brace by a newline, also for the other cases you're fixing up here:
if (Offset >= EFUSE_MAX_HW_SIZE)
return false;
/* DbgPrint("Read fake content, offset = %d\n", Offset); */
...Signature · 1 line
Stefano