From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix printk warning on 64-bit
Date: Mon, 22 Oct 2007 14:51:37 +0200 [thread overview]
Message-ID: <1193057497.9793.3.camel@johannes.berg> (raw)
My AID message patch introduced a warning on 64-bit machines because ~
extends to unsigned long:
| net/mac80211/ieee80211_sta.c: In function =E2=80=98ieee80211_rx_mgmt_=
assoc_resp=E2=80=99:
| net/mac80211/ieee80211_sta.c:1187: warning: format =E2=80=98%d=E2=80=99=
expects type =E2=80=98int=E2=80=99, but argument 7 has type =E2=80=98l=
ong unsigned int=E2=80=99
This fixes it by explicitly casting the result to u16 (which 'aid' is).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.=
c
index f7ffeec..db3cf23 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -1184,7 +1184,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct n=
et_device *dev,
printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=3D0x%x "
"status=3D%d aid=3D%d)\n",
dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa),
- capab_info, status_code, aid & ~(BIT(15) | BIT(14)));
+ capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14))));
=20
if (status_code !=3D WLAN_STATUS_SUCCESS) {
printk(KERN_DEBUG "%s: AP denied association (code=3D%d)\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2007-10-22 14:10 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=1193057497.9793.3.camel@johannes.berg \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox