From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>,
"Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, ath5k-devel@venema.h4ckr.net,
kernel-janitors@vger.kernel.org
Subject: [patch] ath5k: precedence error in ath5k_hw_nic_wakeup()
Date: Wed, 14 Nov 2012 08:23:07 +0000 [thread overview]
Message-ID: <20121114082307.GA31792@elgon.mountain> (raw)
'|' has higher precedence than ?:. Since AR5K_PHY_TURBO_MODE is 0x1 and
"AR5K_PHY_TURBO_MODE | (ah->ah_radio = AR5K_RF2425)" is true then we
always set turbo to zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static analysis fix. I don't have a way to test this.
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index 0c2dd47..4084b10 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -789,9 +789,9 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel)
* (I don't think it supports 44MHz) */
/* On 2425 initvals TURBO_SHORT is not present */
if (ah->ah_bwmode = AR5K_BWMODE_40MHZ) {
- turbo = AR5K_PHY_TURBO_MODE |
- (ah->ah_radio = AR5K_RF2425) ? 0 :
- AR5K_PHY_TURBO_SHORT;
+ turbo = AR5K_PHY_TURBO_MODE;
+ if (ah->ah_radio != AR5K_RF2425)
+ turbo |= AR5K_PHY_TURBO_SHORT;
} else if (ah->ah_bwmode != AR5K_BWMODE_DEFAULT) {
if (ah->ah_radio = AR5K_RF5413) {
mode |= (ah->ah_bwmode = AR5K_BWMODE_10MHZ) ?
reply other threads:[~2012-11-14 8:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121114082307.GA31792@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=ath5k-devel@venema.h4ckr.net \
--cc=jirislaby@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
--cc=mickflemm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox