Staging: wilc1000: Remove unnecessary else after return
PATCH 1/1 Staging: wilc1000: Remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of wilc1000
WARNING: else is not generally useful after a break or return
--- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/coreconfigurator.c +2 -2
@@ -939,9 +939,9 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, gpstrWlanOps->wlan_cfg_get == NULL) {PRINT_D (CORECONFIG_DBG ,"Set and Get is still not initialized\n" );return 1 ; - } else { -PRINT_D (CORECONFIG_DBG ,"SET is initialized\n" ); } +PRINT_D (CORECONFIG_DBG ,"SET is initialized\n" ); +if (u8Mode ==GET_CFG ) {for (counter =0 ; counter < u32WIDsCount; counter++) { PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 13 lines · Dilek Uzulmez
This patch fixes checkpatch.pl warning in files of wilc1000
WARNING: else is not generally useful after a break or returnSigned-off-by Dilek Uzulmez <[email protected]>--- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/wilc1000/coreconfigurator.c +0
-0
drivers/staging/wilc1000/coreconfigurator.c s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, · line 944
Quoted 8 lines
drivers/staging/wilc1000/coreconfigurator.c +2
-2@@ -939,9 +939,9 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, gpstrWlanOps->wlan_cfg_get == NULL) {PRINT_D (CORECONFIG_DBG ,"Set and Get is still not initialized\n" );return 1 ; - } else { -PRINT_D (CORECONFIG_DBG ,"SET is initialized\n" ); } +PRINT_D (CORECONFIG_DBG ,"SET is initialized\n" ); +
Does that indentation look correct to you? It doesn't to me...
thanks,
greg k-h
Quoted 13 lines · Dilek Uzulmez
This patch fixes checkpatch.pl warning in files of wilc1000
WARNING: else is not generally useful after a break or returnSigned-off-by Dilek Uzulmez <[email protected]>--- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/wilc1000/coreconfigurator.c +0
-0
drivers/staging/wilc1000/coreconfigurator.c s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, · line 944
Quoted 8 lines
drivers/staging/wilc1000/coreconfigurator.c +2
-2@@ -939,9 +939,9 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, gpstrWlanOps->wlan_cfg_get == NULL) {PRINT_D (CORECONFIG_DBG ,"Set and Get is still not initialized\n" );return 1 ; - } else { -PRINT_D (CORECONFIG_DBG ,"SET is initialized\n" ); } +PRINT_D (CORECONFIG_DBG ,"SET is initialized\n" ); +
If you drop the else, the PRINT_D should be less indented. Also there is probably no need for a blank line.
julia
Quoted 13 lines
drivers/staging/wilc1000/coreconfigurator.c +0
-1if (u8Mode ==GET_CFG ) {for (counter =0 ; counter < u32WIDsCount; counter++) { PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter, --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/1455887905-7002-1-git-send-email-dilekuzulmez%40gmail.com.
For more options, visit https://groups.google.com/d/optout.