[PATCH 07/16] staging: wlags49_h2: Remove unnecessary braces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/staging/wlags49_h2/wl_netdev.c |   35 ++++++++------------------------
 1 file changed, 9 insertions(+), 26 deletions(-)

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 */
 				}
 			}
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux