summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192se/def.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-04-03 23:46:49 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 22:23:56 +0200
commitda951c2417ec1020d0d00813da36f38e395994e9 (patch)
tree65404e5b7e22c2fbaa8ac0609213404c47b60cf5 /drivers/net/wireless/rtlwifi/rtl8192se/def.h
parentath9k: Add more recv stats. (diff)
downloadlinux-da951c2417ec1020d0d00813da36f38e395994e9.tar.xz
linux-da951c2417ec1020d0d00813da36f38e395994e9.zip
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/rtlwifi/rtl8192se/def.h')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/def.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/def.h b/drivers/net/wireless/rtlwifi/rtl8192se/def.h
index d1b0a1e14971..20afec62ce05 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/def.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/def.h
@@ -252,12 +252,7 @@
* the desc is cleared. */
#define TX_DESC_NEXT_DESC_OFFSET 36
#define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size) \
-do { \
- if (_size > TX_DESC_NEXT_DESC_OFFSET) \
- memset(__pdesc, 0, TX_DESC_NEXT_DESC_OFFSET); \
- else \
- memset(__pdesc, 0, _size); \
-} while (0);
+ memset(__pdesc, 0, min_t(size_t, _size, TX_DESC_NEXT_DESC_OFFSET))
/* Rx Desc */
#define RX_STATUS_DESC_SIZE 24