Commit ebc43d09 authored by James A Shackleford's avatar James A Shackleford Committed by Greg Kroah-Hartman

staging: vt6655: fix sparse warning "cast removes address space of expression"

Add missing __user macro to second parameter of ethtool_ioctl().
This removes the need for the offending (void *) cast of the user space pointer
rq->ifr_data.
Signed-off-by: default avatarJames A Shackleford <shack@linux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4e13d410
...@@ -302,7 +302,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev); ...@@ -302,7 +302,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev);
//2008-0714<Add>by Mike Liu //2008-0714<Add>by Mike Liu
static bool device_release_WPADEV(PSDevice pDevice); static bool device_release_WPADEV(PSDevice pDevice);
static int ethtool_ioctl(struct net_device *dev, void *useraddr); static int ethtool_ioctl(struct net_device *dev, void __user *useraddr);
static int device_rx_srv(PSDevice pDevice, unsigned int uIdx); static int device_rx_srv(PSDevice pDevice, unsigned int uIdx);
static int device_tx_srv(PSDevice pDevice, unsigned int uIdx); static int device_tx_srv(PSDevice pDevice, unsigned int uIdx);
static bool device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pDesc); static bool device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pDesc);
...@@ -3067,7 +3067,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -3067,7 +3067,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
break; break;
case SIOCETHTOOL: case SIOCETHTOOL:
return ethtool_ioctl(dev, (void *)rq->ifr_data); return ethtool_ioctl(dev, rq->ifr_data);
// All other calls are currently unsupported // All other calls are currently unsupported
default: default:
...@@ -3103,7 +3103,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -3103,7 +3103,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
return rc; return rc;
} }
static int ethtool_ioctl(struct net_device *dev, void *useraddr) static int ethtool_ioctl(struct net_device *dev, void __user *useraddr)
{ {
u32 ethcmd; u32 ethcmd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment