Skip to content

Commit f1e2fb6

Browse files
bjelja-jelenagregkh
authored andcommitted
staging: wlags49_h2: Delete unnecessary braces
Fix the following checkpatch.pl warnings in wl_netdev.c: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0d0560e commit f1e2fb6

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

‎drivers/staging/wlags49_h2/wl_netdev.c‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,15 @@ struct net_device_stats *wl_stats(struct net_device *dev)
225225
#ifdef USE_WDS
226226

227227
for (count = 0; count < NUM_WDS_PORTS; count++) {
228-
if (dev == lp->wds_port[count].dev) {
228+
if (dev == lp->wds_port[count].dev)
229229
pStats = &(lp->wds_port[count].stats);
230-
}
231230
}
232231

233232
#endif /* USE_WDS */
234233

235234
/* If pStats is still NULL, then the device is not a WDS port */
236-
if (pStats == NULL) {
235+
if (pStats == NULL)
237236
pStats = &(lp->stats);
238-
}
239237

240238
wl_unlock(lp, &flags);
241239

@@ -578,9 +576,8 @@ void wl_tx_timeout(struct net_device *dev)
578576
#endif /* USE_WDS */
579577

580578
/* If pStats is still NULL, then the device is not a WDS port */
581-
if (pStats == NULL) {
579+
if (pStats == NULL)
582580
pStats = &(lp->stats);
583-
}
584581

585582
/* Accumulate the timeout error */
586583
pStats->tx_errors++;
@@ -663,9 +660,8 @@ int wl_send(struct wl_private *lp)
663660
}
664661
}
665662

666-
if (lp->txF.skb == NULL) {
663+
if (lp->txF.skb == NULL)
667664
return FALSE;
668-
}
669665

670666
/* If the device has resources (FIDs) available, then Tx the packet */
671667
/* Format the TxRequest and send it to the adapter */
@@ -926,9 +922,8 @@ int wl_rx(struct net_device *dev)
926922
DBG_ERROR(DbgInfo,
927923
"Rx request to card FAILED\n");
928924

929-
if (port == 0) {
925+
if (port == 0)
930926
lp->stats.rx_dropped++;
931-
}
932927
#ifdef USE_WDS
933928
else {
934929
lp->wds_port[port -
@@ -942,9 +937,8 @@ int wl_rx(struct net_device *dev)
942937
} else {
943938
DBG_ERROR(DbgInfo, "Could not alloc skb\n");
944939

945-
if (port == 0) {
940+
if (port == 0)
946941
lp->stats.rx_dropped++;
947-
}
948942
#ifdef USE_WDS
949943
else {
950944
lp->wds_port[port -
@@ -1657,9 +1651,8 @@ void wl_wds_netif_carrier_on(struct wl_private *lp)
16571651

16581652
if (lp != NULL) {
16591653
for (count = 0; count < NUM_WDS_PORTS; count++) {
1660-
if (lp->wds_port[count].is_registered) {
1654+
if (lp->wds_port[count].is_registered)
16611655
netif_carrier_on(lp->wds_port[count].dev);
1662-
}
16631656
}
16641657
}
16651658
} /* wl_wds_netif_carrier_on */
@@ -1936,9 +1929,8 @@ int wl_rx_dma(struct net_device *dev)
19361929
DBG_ERROR(DbgInfo,
19371930
"Could not alloc skb\n");
19381931

1939-
if (port == 0) {
1932+
if (port == 0)
19401933
lp->stats.rx_dropped++;
1941-
}
19421934
#ifdef USE_WDS
19431935
else {
19441936
lp->wds_port[port -

0 commit comments

Comments
 (0)