diff options
author | Joe Perches <joe@perches.com> | 2012-04-03 17:46:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-11 16:23:56 -0400 |
commit | da951c2417ec1020d0d00813da36f38e395994e9 (patch) | |
tree | 65404e5b7e22c2fbaa8ac0609213404c47b60cf5 /drivers/net/wireless/mwifiex | |
parent | 150721894e3613a228e212615909ade14964235c (diff) |
wireless: Remove unnecessary ; from while (0) macros
Semicolons are not necessary after macros that end in while (0).
Remove them.
Simplify the macros with tests of
do { if (foo>size) memset1; else memset2;} while (0);
to a single line memset(,,min_t(size_t, foo, size))
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h index a3fb322205b..0ead152e3d1 100644 --- a/drivers/net/wireless/mwifiex/sdio.h +++ b/drivers/net/wireless/mwifiex/sdio.h | |||
@@ -193,7 +193,7 @@ | |||
193 | a->mpa_tx.ports |= (1<<(a->mpa_tx.pkt_cnt+1+(MAX_PORT - \ | 193 | a->mpa_tx.ports |= (1<<(a->mpa_tx.pkt_cnt+1+(MAX_PORT - \ |
194 | a->mp_end_port))); \ | 194 | a->mp_end_port))); \ |
195 | a->mpa_tx.pkt_cnt++; \ | 195 | a->mpa_tx.pkt_cnt++; \ |
196 | } while (0); | 196 | } while (0) |
197 | 197 | ||
198 | /* SDIO Tx aggregation limit ? */ | 198 | /* SDIO Tx aggregation limit ? */ |
199 | #define MP_TX_AGGR_PKT_LIMIT_REACHED(a) \ | 199 | #define MP_TX_AGGR_PKT_LIMIT_REACHED(a) \ |
@@ -211,7 +211,7 @@ | |||
211 | a->mpa_tx.buf_len = 0; \ | 211 | a->mpa_tx.buf_len = 0; \ |
212 | a->mpa_tx.ports = 0; \ | 212 | a->mpa_tx.ports = 0; \ |
213 | a->mpa_tx.start_port = 0; \ | 213 | a->mpa_tx.start_port = 0; \ |
214 | } while (0); | 214 | } while (0) |
215 | 215 | ||
216 | /* SDIO Rx aggregation limit ? */ | 216 | /* SDIO Rx aggregation limit ? */ |
217 | #define MP_RX_AGGR_PKT_LIMIT_REACHED(a) \ | 217 | #define MP_RX_AGGR_PKT_LIMIT_REACHED(a) \ |
@@ -242,7 +242,7 @@ | |||
242 | a->mpa_rx.skb_arr[a->mpa_rx.pkt_cnt] = skb; \ | 242 | a->mpa_rx.skb_arr[a->mpa_rx.pkt_cnt] = skb; \ |
243 | a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = skb->len; \ | 243 | a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = skb->len; \ |
244 | a->mpa_rx.pkt_cnt++; \ | 244 | a->mpa_rx.pkt_cnt++; \ |
245 | } while (0); | 245 | } while (0) |
246 | 246 | ||
247 | /* Reset SDIO Rx aggregation buffer parameters */ | 247 | /* Reset SDIO Rx aggregation buffer parameters */ |
248 | #define MP_RX_AGGR_BUF_RESET(a) do { \ | 248 | #define MP_RX_AGGR_BUF_RESET(a) do { \ |
@@ -250,7 +250,7 @@ | |||
250 | a->mpa_rx.buf_len = 0; \ | 250 | a->mpa_rx.buf_len = 0; \ |
251 | a->mpa_rx.ports = 0; \ | 251 | a->mpa_rx.ports = 0; \ |
252 | a->mpa_rx.start_port = 0; \ | 252 | a->mpa_rx.start_port = 0; \ |
253 | } while (0); | 253 | } while (0) |
254 | 254 | ||
255 | 255 | ||
256 | /* data structure for SDIO MPA TX */ | 256 | /* data structure for SDIO MPA TX */ |