[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1395217235-2979-5-git-send-email-mathieu.maret@gmail.com>
Date: Wed, 19 Mar 2014 09:20:35 +0100
From: Mathieu Maret <mathieu.maret@...il.com>
To: pe1dnn@...at.org, gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Mathieu Maret <mathieu.maret@...il.com>
Subject: [PATCH 5/5] staging: wlags49_h2: Correct coding style in wl_netdev.c
Remove space between parenthesis.
Test with simple statement does not need brackets.
Simplify test condition
Signed-off-by: Mathieu Maret <mathieu.maret@...il.com>
---
drivers/staging/wlags49_h2/wl_netdev.c | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c
index 6455956..22d9ba3 100644
--- a/drivers/staging/wlags49_h2/wl_netdev.c
+++ b/drivers/staging/wlags49_h2/wl_netdev.c
@@ -113,7 +113,7 @@
status = hcf_rcv_msg(&(lp->hcfCtx), desc, 0) \
} while (0)
-#define BLOCK_INPUT_DMA(buf, len) memcpy( buf, desc_next->buf_addr, pktlen )
+#define BLOCK_INPUT_DMA(buf, len) memcpy(buf, desc_next->buf_addr, pktlen)
/*******************************************************************************
* function prototypes
@@ -225,17 +225,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);
@@ -578,9 +576,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++;
@@ -663,9 +660,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 */
@@ -926,9 +922,8 @@ int wl_rx(struct net_device *dev)
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 -
@@ -942,9 +937,8 @@ 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 -
@@ -1657,9 +1651,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 */
@@ -1819,7 +1812,8 @@ int wl_rx_dma(struct net_device *dev)
DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
- if (((lp = dev->priv) != NULL) && !(lp->flags & WVLAN2_UIL_BUSY)) {
+ lp = dev->priv;
+ if ((lp != NULL) && !(lp->flags & WVLAN2_UIL_BUSY)) {
#ifdef USE_RTS
if (lp->useRTS == 1) {
@@ -1935,9 +1929,8 @@ int wl_rx_dma(struct net_device *dev)
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.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists