* [patch] staging: rtl8192u: fix a macro expansion bug
@ 2012-10-02 8:26 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-10-02 8:26 UTC (permalink / raw)
To: kernel-janitors
Clang detected this macro expansion bug:
drivers/staging/rtl8192u/r8192U_core.c:2384:76: warning: operator '?:'
has lower precedence than '+'; '+' will be evaluated first
[-Wparentheses]
The line from the .c file looks like this:
u1bAIFS = qos_parameters->aifs[i] * ((mode&(IEEE_G|IEEE_N_24G)) ?9:20) + aSifsTime;
We need to put parenthesis around the entire macro to fix the bug.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 13f45c3..502bfdb 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -235,7 +235,10 @@ enum _ReasonCode{
-#define aSifsTime ((priv->ieee80211->current_network.mode = IEEE_A)||(priv->ieee80211->current_network.mode = IEEE_N_24G)||(priv->ieee80211->current_network.mode = IEEE_N_5G))? 16 : 10
+#define aSifsTime ((priv->ieee80211->current_network.mode = IEEE_A || \
+ priv->ieee80211->current_network.mode = IEEE_N_24G || \
+ priv->ieee80211->current_network.mode = IEEE_N_5G) ? \
+ 16 : 10)
#define MGMT_QUEUE_NUM 5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-02 8:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 8:26 [patch] staging: rtl8192u: fix a macro expansion bug Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox