From: Larry Finger <Larry.Finger@lwfinger.net>
To: Jouni Malinen <j@w1.fi>, John Linville <linville@tuxdriver.com>
Cc: wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] hostap: Fix sparse warnings
Date: Thu, 16 Oct 2008 08:46:09 -0700 [thread overview]
Message-ID: <48F761C1.9000109@lwfinger.net> (raw)
A compilation with the command "make C=2 CF="-D__CHECK_ENDIAN__" \
drivers/net/wireless/hostap/"
yields the following warnings:
CHECK drivers/net/wireless/hostap/hostap_info.c
drivers/net/wireless/hostap/hostap_info.c:156:43: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:156:43: expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:156:43: got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:294:44: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:294:44: expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:294:44: got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:487:12: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:487:12: expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:487:12: got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:491:12: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:491:12: expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:491:12: got long *<noident>
The warnings are fixed with the following compile-tested changes:
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-testing/drivers/net/wireless/hostap/hostap_info.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/hostap/hostap_info.c
+++ wireless-testing/drivers/net/wireless/hostap/hostap_info.c
@@ -153,7 +153,7 @@ static void prism2_info_linkstatus(local
}
/* Get current BSSID later in scheduled task */
- set_bit(PRISM2_INFO_PENDING_LINKSTATUS, &local->pending_info);
+ set_bit(PRISM2_INFO_PENDING_LINKSTATUS, (ulong *)&local->pending_info);
local->prev_link_status = val;
schedule_work(&local->info_queue);
}
@@ -291,7 +291,7 @@ static void prism2_info_scanresults(loca
hostap_report_scan_complete(local);
/* Perform rest of ScanResults handling later in scheduled task */
- set_bit(PRISM2_INFO_PENDING_SCANRESULTS, &local->pending_info);
+ set_bit(PRISM2_INFO_PENDING_SCANRESULTS, (ulong *)&local->pending_info);
schedule_work(&local->info_queue);
}
@@ -484,11 +484,11 @@ static void handle_info_queue(struct wor
local_info_t *local = container_of(work, local_info_t, info_queue);
if (test_and_clear_bit(PRISM2_INFO_PENDING_LINKSTATUS,
- &local->pending_info))
+ (ulong *)&local->pending_info))
handle_info_queue_linkstatus(local);
if (test_and_clear_bit(PRISM2_INFO_PENDING_SCANRESULTS,
- &local->pending_info))
+ (ulong *)&local->pending_info))
handle_info_queue_scanresults(local);
}
#endif /* PRISM2_NO_STATION_MODES */
next reply other threads:[~2008-10-16 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 15:46 Larry Finger [this message]
2008-10-16 15:50 ` [PATCH] hostap: Fix sparse warnings Johannes Berg
2008-10-16 23:43 ` Larry Finger
2008-10-16 23:44 ` [PATCH V2] " Larry Finger
2008-10-19 14:29 ` Jouni Malinen
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=48F761C1.9000109@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=j@w1.fi \
--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;
as well as URLs for NNTP newsgroup(s).