Commit 4eef80b0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: fixed up some __user warnings reported by sparse in drivers/usb/net/*

parent 5bcd0bb6
...@@ -667,7 +667,7 @@ static void catc_set_multicast_list(struct net_device *netdev) ...@@ -667,7 +667,7 @@ static void catc_set_multicast_list(struct net_device *netdev)
/* /*
* ioctl's * ioctl's
*/ */
static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr) static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
{ {
struct catc *catc = dev->priv; struct catc *catc = dev->priv;
u32 cmd; u32 cmd;
...@@ -726,7 +726,7 @@ static int catc_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -726,7 +726,7 @@ static int catc_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
switch(cmd) { switch(cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data); return netdev_ethtool_ioctl(dev, (void __user *)rq->ifr_data);
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -662,7 +662,7 @@ static int kaweth_close(struct net_device *net) ...@@ -662,7 +662,7 @@ static int kaweth_close(struct net_device *net)
return 0; return 0;
} }
static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr) static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
{ {
u32 ethcmd; u32 ethcmd;
...@@ -689,7 +689,7 @@ static int kaweth_ioctl(struct net_device *net, struct ifreq *rq, int cmd) ...@@ -689,7 +689,7 @@ static int kaweth_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
{ {
switch (cmd) { switch (cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
return netdev_ethtool_ioctl(net, (void *) rq->ifr_data); return netdev_ethtool_ioctl(net, (void __user *)rq->ifr_data);
} }
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -945,7 +945,7 @@ static int pegasus_close(struct net_device *net) ...@@ -945,7 +945,7 @@ static int pegasus_close(struct net_device *net)
return 0; return 0;
} }
#ifdef CONFIG_MII #ifdef CONFIG_MII
static int pegasus_ethtool_ioctl(struct net_device *dev, void *useraddr) static int pegasus_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
{ {
u32 ethcmd; u32 ethcmd;
...@@ -1024,7 +1024,7 @@ static int pegasus_ethtool_ioctl(struct net_device *dev, void *useraddr) ...@@ -1024,7 +1024,7 @@ static int pegasus_ethtool_ioctl(struct net_device *dev, void *useraddr)
} }
#else #else
static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr) static int pegasus_ethtool_ioctl(struct net_device *net, void __user *uaddr)
{ {
pegasus_t *pegasus; pegasus_t *pegasus;
int cmd; int cmd;
...@@ -1113,7 +1113,7 @@ static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd) ...@@ -1113,7 +1113,7 @@ static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
switch (cmd) { switch (cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
res = pegasus_ethtool_ioctl(net, rq->ifr_data); res = pegasus_ethtool_ioctl(net, (void __user *)rq->ifr_data);
break; break;
case SIOCDEVPRIVATE: case SIOCDEVPRIVATE:
data[0] = pegasus->phy; data[0] = pegasus->phy;
......
...@@ -673,7 +673,7 @@ static int rtl8150_close(struct net_device *netdev) ...@@ -673,7 +673,7 @@ static int rtl8150_close(struct net_device *netdev)
return res; return res;
} }
static int rtl8150_ethtool_ioctl(struct net_device *netdev, void *uaddr) static int rtl8150_ethtool_ioctl(struct net_device *netdev, void __user *uaddr)
{ {
rtl8150_t *dev; rtl8150_t *dev;
int cmd; int cmd;
...@@ -758,7 +758,7 @@ static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) ...@@ -758,7 +758,7 @@ static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
switch (cmd) { switch (cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
res = rtl8150_ethtool_ioctl(netdev, rq->ifr_data); res = rtl8150_ethtool_ioctl(netdev, (void __user *)rq->ifr_data);
break; break;
case SIOCDEVPRIVATE: case SIOCDEVPRIVATE:
data[0] = dev->phy; data[0] = dev->phy;
......
...@@ -2097,7 +2097,7 @@ static int usbnet_open (struct net_device *net) ...@@ -2097,7 +2097,7 @@ static int usbnet_open (struct net_device *net)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static inline int static inline int
usbnet_ethtool_ioctl (struct net_device *net, void *useraddr) usbnet_ethtool_ioctl (struct net_device *net, void __user *useraddr)
{ {
struct usbnet *dev = (struct usbnet *) net->priv; struct usbnet *dev = (struct usbnet *) net->priv;
u32 cmd; u32 cmd;
...@@ -2161,7 +2161,7 @@ static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd) ...@@ -2161,7 +2161,7 @@ static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
{ {
switch (cmd) { switch (cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
return usbnet_ethtool_ioctl (net, (void *)rq->ifr_data); return usbnet_ethtool_ioctl (net, (void __user *)rq->ifr_data);
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
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