From: Bob Copeland <me@bobcopeland.com>
To: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Cc: johannes@sipsolutions.net, ath5k-devel@lists.ath5k.org
Subject: [PATCH] ath5k: fix endianness of bitwise ops when installing mic
Date: Tue, 9 Dec 2008 23:05:38 -0500 [thread overview]
Message-ID: <20081210040538.GA11810@hash.localnet> (raw)
Fix these bugs found by sparse:
ath5k/pcu.c:1102:21: warning: restricted __le32 degrades to integer
ath5k/pcu.c:1102:13: warning: incorrect type in assignment (different base types)
ath5k/pcu.c:1102:13: expected restricted __le32 <noident>
ath5k/pcu.c:1102:13: got unsigned int
ath5k/pcu.c:1104:20: warning: restricted __le32 degrades to integer
ath5k/pcu.c:1104:13: warning: incorrect type in assignment (different base types)
ath5k/pcu.c:1104:13: expected restricted __le32 <noident>
ath5k/pcu.c:1104:13: got unsigned int
Changes-licensed-under: ISC
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/ath5k/pcu.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index dabe422..0cac05c 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -1099,9 +1099,9 @@ int ath5k_hw_set_key(struct ath5k_hw *ah, u16 entry,
if (ah->ah_combined_mic) {
key_v[0] = rxmic[0];
- key_v[1] = (txmic[0] >> 16) & 0xffff;
+ key_v[1] = cpu_to_le32(le32_to_cpu(txmic[0]) >> 16);
key_v[2] = rxmic[1];
- key_v[3] = txmic[0] & 0xffff;
+ key_v[3] = cpu_to_le32(le32_to_cpu(txmic[0]) & 0xffff);
key_v[4] = txmic[1];
} else {
key_v[0] = rxmic[0];
--
1.6.0.4
--
Bob Copeland %% www.bobcopeland.com
next reply other threads:[~2008-12-10 4:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 4:05 Bob Copeland [this message]
2008-12-10 4:30 ` [PATCH] ath5k: fix endianness of bitwise ops when installing mic Larry Finger
2008-12-10 4:54 ` Bob Copeland
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=20081210040538.GA11810@hash.localnet \
--to=me@bobcopeland.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.