From: Larry Finger <Larry.Finger@lwfinger.net>
To: gregkh@linuxfoundation.org
Cc: netdev@vger.kernel.org, Larry Finger <Larry.Finger@lwfinger.net>,
devel@driverdev.osuosl.org
Subject: [PATCH 3/9 RESENT] staging: r8188eu: Fix sparse warnings in ioctl_linux.c
Date: Fri, 18 Oct 2013 16:34:31 -0500 [thread overview]
Message-ID: <5261A967.9000909@lwfinger.net> (raw)
In-Reply-To: <1382129563-8496-1-git-send-email-Larry.Finger@lwfinger.net>
Sparse checking results in the following warnings:
CHECK drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3932:17: warning: cast removes
address space of expression
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3933:31: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3933:31: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3933:31: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3935:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3935:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3935:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3937:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3937:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3937:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3939:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3939:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3939:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3941:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3941:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3941:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3944:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3944:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3944:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3946:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3946:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3946:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3949:38: warning: incorrect type
in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3949:38: expected void const
*<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3949:38: got void [noderef]
<asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3963:9: warning: cast removes
address space of expression
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index ae54587..5dc3fed 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -3929,24 +3929,24 @@ static int rtw_p2p_get(struct net_device *dev,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
if (padapter->bShowGetP2PState)
- DBG_88E("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer);
- if (!memcmp(wrqu->data.pointer, "status", 6)) {
+ DBG_88E("[%s] extra = %s\n", __func__, (__force char *)wrqu->data.pointer);
+ if (!memcmp((__force const char *)wrqu->data.pointer, "status", 6)) {
rtw_p2p_get_status(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "role", 4)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "role", 4)) {
rtw_p2p_get_role(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "peer_ifa", 8)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "peer_ifa", 8)) {
rtw_p2p_get_peer_ifaddr(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "req_cm", 6)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "req_cm", 6)) {
rtw_p2p_get_req_cm(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "peer_deva", 9)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "peer_deva", 9)) {
/* Get the P2P device address when receiving the provision discovery request
frame. */
rtw_p2p_get_peer_devaddr(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "group_id", 8)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "group_id", 8)) {
rtw_p2p_get_groupid(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "peer_deva_inv", 9)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "peer_deva_inv",
9)) {
/* Get the P2P device address when receiving the P2P Invitation request
frame. */
rtw_p2p_get_peer_devaddr_by_invitation(dev, info, wrqu, extra);
- } else if (!memcmp(wrqu->data.pointer, "op_ch", 5)) {
+ } else if (!memcmp((__force const char *)wrqu->data.pointer, "op_ch", 5)) {
rtw_p2p_get_op_ch(dev, info, wrqu, extra);
}
#endif /* CONFIG_88EU_P2P */
@@ -3960,7 +3960,7 @@ static int rtw_p2p_get2(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_88EU_P2P
- DBG_88E("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer);
+ DBG_88E("[%s] extra = %s\n", __func__, (__force char *)wrqu->data.pointer);
if (!memcmp(extra, "wpsCM =", 6)) {
wrqu->data.length -= 6;
rtw_p2p_get_wps_configmethod(dev, info, wrqu, &extra[6]);
--
1.8.4
next prev parent reply other threads:[~2013-10-18 21:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1382129563-8496-1-git-send-email-Larry.Finger@lwfinger.net>
2013-10-18 21:32 ` [PATCH 1/9 RESENT] staging: r8188eu: Set device type to wlan Larry Finger
2013-10-18 21:58 ` Sergei Shtylyov
2013-10-18 21:33 ` [PATCH 2/9 RESENT] staging: r8188eu: Fix Sparse warnings in rtw_wlan_util Larry Finger
2013-10-18 22:05 ` Ben Hutchings
2013-10-18 21:34 ` Larry Finger [this message]
2013-10-18 22:08 ` [PATCH 3/9 RESENT] staging: r8188eu: Fix sparse warnings in ioctl_linux.c Ben Hutchings
2013-10-19 1:45 ` Larry Finger
2013-10-18 21:35 ` [PATCH 4/9 RESENT] staging: r8188eu: Fix sparse warnings in rtw_ieee80211.c Larry Finger
2013-10-18 21:35 ` [PATCH 5/9 RESENT] staging: r8188eu: Fix sparse warnings in rtl8188e.cmd.c Larry Finger
2013-10-18 21:36 ` [PATCH 6/9 RESENT] staging: r8188eu: Fix sparse warnings in rtw_mlme_ext.c Larry Finger
2013-10-18 21:37 ` [PATCH 7/9 RESENT] staging: r8188eu: Fix sparse warnings in rtl_p2p.c Larry Finger
2013-10-18 21:37 ` [PATCH 8/9 RESENT] staging: r8188eu: Fix sparse warnings in rtw_xmit.c Larry Finger
2013-10-18 21:38 ` [PATCH 9/9 RESENT] staging: r8188eu: Fix sparse warnings in rtw_br_ext.c Larry Finger
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=5261A967.9000909@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=netdev@vger.kernel.org \
/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.