drivers: staging: wilc1000: else is not generally useful after a break or return
PATCH 1/1 drivers: staging: wilc1000: else is not generally useful after a break or return
Remove else after a break. Because else is generally not useful after a break or return.
Signed-off-by Anchal Jain <[email protected]>
--- drivers/staging/wilc1000/wilc_wlan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/wilc_wlan.c +3 -5
@@ -626,14 +626,13 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)if ((reg &0x1 ) ==0 ) {break ; - }else { + } counter++;if (counter >200 ) { counter =0 ; ret = wilc->hif_func->hif_write_reg (wilc,WILC_HOST_TX_CTRL ,0 );break ; - } - } + } }while (!wilc->quit);if (!ret)
@@ -679,9 +678,8 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)if (!ret)break ;break ; - }else { -break ; } +break ; }while (1 );if (!ret)
Signature · 1 line
1.9.1
Quoted 1 line · Anchal Jain
Remove else after a break. Because else is generally not useful after a break or return.
The lines in the commit log message should be at most 80 characters, ideally a bit less.
Quoted 10 lines
Signed-off-by Anchal Jain <[email protected]>--- drivers/staging/wilc1000/wilc_wlan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/staging/wilc1000/wilc_wlan.c +0
-0
drivers/staging/wilc1000/wilc_wlan.c int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) · line 630
Quoted 6 lines
drivers/staging/wilc1000/wilc_wlan.c +1
-1@@ -626,14 +626,13 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)if ((reg &0x1 ) ==0 ) {break ; - }else { + } counter++;
The above line and the ones following are no longer inside an if, so they should be less indented.
drivers/staging/wilc1000/wilc_wlan.c int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) · line 635
Quoted 7 lines
drivers/staging/wilc1000/wilc_wlan.c +1
-2if (counter >200 ) { counter =0 ; ret = wilc->hif_func->hif_write_reg (wilc,WILC_HOST_TX_CTRL ,0 );break ; - } - } + }
The above brace does not appear to be in the right place.
julia
Quoted 24 lines
drivers/staging/wilc1000/wilc_wlan.c +1
-2}while (!wilc->quit);if (!ret)@@ -679,9 +678,8 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)if (!ret)break ;break ; - }else { -break ; } +break ; }while (1 );if (!ret)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/20160312161141.GA3241%40life-desktop. For more options, visit https://groups.google.com/d/optout.