diff options
author | Elena Oat <oat.elena@gmail.com> | 2014-03-12 12:19:25 +0200 |
---|---|---|
committer | Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> | 2014-03-13 16:49:19 -0700 |
commit | 160eaf20a8de747c32881b52f08eeb4394f8d9a6 (patch) | |
tree | 94747fb7a27a5dad1a10cd2bf2cc6c10a789b6ac /drivers | |
parent | 34a2c5fe5b33fd8bbe7a0ec560bae2808a362130 (diff) |
Staging: rtl8188eu: Fix sparse warnings.
This patch fixes following warnings produced by sparse:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3867:31: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3867:31: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3869:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3869:38: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3869:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3871:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3871:38: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3871:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3873:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3873:38: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3873:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3875:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3875:38: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3875:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3878:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3878:38: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3878:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3880:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3880:38: expected void
const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3880:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3883:38: warning:
incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3883:38: expected void const *<noident>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3883:38: got void
[noderef] <asn:1>*pointer
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3897:9: warning: cast
removes address space of expression
While at it, I have also fixed the warnings of lines over 80 characters.
Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 3d6af645b9ee..2636e7f3dbb8 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -3865,24 +3865,33 @@ 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__, + (char __user *)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 */ @@ -3896,7 +3905,8 @@ 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__, + (char __user *)wrqu->data.pointer); if (!memcmp(extra, "wpsCM =", 6)) { wrqu->data.length -= 6; rtw_p2p_get_wps_configmethod(dev, info, wrqu, &extra[6]); |