[OPW,kernel,07/16] staging: wlags49_h2: Remove unnecessary braces
diff mbox

Message ID 24ccc58a01edc35d1901c9d66a282ae35e4312d9.1395092557.git.jelena.bjelja.ing@gmail.com
State New, archived
Headers show

Commit Message

Jelena Bjelja March 17, 2014, 10:39 p.m. UTC
This patch fixes the following checkpatch.pl issues in wl_netdev.c:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
---
 drivers/staging/wlags49_h2/wl_netdev.c |   35 ++++++++------------------------
 1 file changed, 9 insertions(+), 26 deletions(-)

Patch
diff mbox

diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c
index 0ac4432..4b81ecc 100644
--- a/drivers/staging/wlags49_h2/wl_netdev.c
+++ b/drivers/staging/wlags49_h2/wl_netdev.c
@@ -252,17 +252,15 @@  struct net_device_stats *wl_stats(struct net_device *dev)
 #ifdef USE_WDS
 
 	for (count = 0; count < NUM_WDS_PORTS; count++) {
-		if (dev == lp->wds_port[count].dev) {
+		if (dev == lp->wds_port[count].dev)
 			pStats = &(lp->wds_port[count].stats);
-		}
 	}
 
 #endif  /* USE_WDS */
 
 	/* If pStats is still NULL, then the device is not a WDS port */
-	if (pStats == NULL) {
+	if (pStats == NULL)
 		pStats = &(lp->stats);
-	}
 
 	wl_unlock(lp, &flags);
 
@@ -312,9 +310,8 @@  int wl_open(struct net_device *dev)
 		DBG_TRACE(DbgInfo, "Enabling Port 0\n");
 		status = wl_enable(lp);
 
-		if (status != HCF_SUCCESS) {
+		if (status != HCF_SUCCESS)
 			DBG_TRACE(DbgInfo, "Enable port 0 failed: 0x%x\n", status);
-		}
 	}
 
 	/* Holding the lock too long, make a gap to allow other processes */
@@ -599,9 +596,8 @@  void wl_tx_timeout(struct net_device *dev)
 #endif  /* USE_WDS */
 
 	/* If pStats is still NULL, then the device is not a WDS port */
-	if (pStats == NULL) {
+	if (pStats == NULL)
 		pStats = &(lp->stats);
-	}
 
 	/* Accumulate the timeout error */
 	pStats->tx_errors++;
@@ -649,9 +645,8 @@  int wl_send(struct wl_private *lp)
 
 	/* Check for the availability of FIDs; if none are available, don't take any
 	frames off the txQ */
-	if (lp->hcfCtx.IFB_RscInd == 0) {
+	if (lp->hcfCtx.IFB_RscInd == 0)
 		return FALSE;
-	}
 
 	/* Reclaim the TxQ Elements and place them back on the free queue */
 	if (!list_empty(&(lp->txQ[0]))) {
@@ -681,9 +676,8 @@  int wl_send(struct wl_private *lp)
 		}
 	}
 
-	if (lp->txF.skb == NULL) {
+	if (lp->txF.skb == NULL)
 		return FALSE;
-	}
 
 	/* If the device has resources (FIDs) available, then Tx the packet */
 	/* Format the TxRequest and send it to the adapter */
@@ -937,14 +931,11 @@  int wl_rx(struct net_device *dev)
 					} else {
 						DBG_ERROR(DbgInfo, "Rx request to card FAILED\n");
 
-						if (port == 0) {
+						if (port == 0)
 							lp->stats.rx_dropped++;
-						}
 #ifdef USE_WDS
 						else
-						{
 							lp->wds_port[port-1].stats.rx_dropped++;
-						}
 #endif  /* USE_WDS */
 
 						dev_kfree_skb(skb);
@@ -952,14 +943,11 @@  int wl_rx(struct net_device *dev)
 			} else {
 				DBG_ERROR(DbgInfo, "Could not alloc skb\n");
 
-				if (port == 0) {
+				if (port == 0)
 						lp->stats.rx_dropped++;
-				}
 #ifdef USE_WDS
 				else
-				{
 					lp->wds_port[port-1].stats.rx_dropped++;
-				}
 #endif  /* USE_WDS */
 			}
 		}
@@ -1634,9 +1622,8 @@  void wl_wds_netif_carrier_on(struct wl_private *lp)
 
 	if (lp != NULL) {
 		for (count = 0; count < NUM_WDS_PORTS; count++) {
-			if (lp->wds_port[count].is_registered) {
+			if (lp->wds_port[count].is_registered)
 				netif_carrier_on(lp->wds_port[count].dev);
-			}
 		}
 	}
 } /* wl_wds_netif_carrier_on */
@@ -1905,14 +1892,10 @@  int wl_rx_dma(struct net_device *dev)
 					DBG_ERROR(DbgInfo, "Could not alloc skb\n");
 
 					if (port == 0)
-					{
 						lp->stats.rx_dropped++;
-					}
 #ifdef USE_WDS
 					else
-					{
 						lp->wds_port[port-1].stats.rx_dropped++;
-					}
 #endif  /* USE_WDS */
 				}
 			}