]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: ->ifr_data annotation
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 17:38:07 +0000 (10:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 17:38:07 +0000 (10:38 -0700)
->ifr_data users annotated.

32 files changed:
drivers/ieee1394/eth1394.c
drivers/net/3c509.c
drivers/net/amd8111e.c
drivers/net/bonding/bond_main.c
drivers/net/dl2k.c
drivers/net/eepro100.c
drivers/net/ewrk3.c
drivers/net/forcedeth.c
drivers/net/hamachi.c
drivers/net/hamradio/bpqether.c
drivers/net/hamradio/scc.c
drivers/net/ixgb/ixgb_ethtool.c
drivers/net/natsemi.c
drivers/net/ns83820.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/rrunner.c
drivers/net/starfire.c
drivers/net/sundance.c
drivers/net/tulip/tulip_core.c
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/typhoon.c
drivers/net/wan/dlci.c
drivers/net/wan/sdla.c
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/wl3501_cs.c
drivers/net/yellowfin.c
drivers/usb/gadget/ether.c
drivers/usb/net/catc.c
drivers/usb/net/kaweth.c
drivers/usb/net/pegasus.c
drivers/usb/net/rtl8150.c
include/linux/if.h

index d99ac5dda4c301215979c3bd46f8bcf22113349b..2207597d3619c1ff1a8662da1d7de86a1a23c3e1 100644 (file)
@@ -191,7 +191,7 @@ static int ether1394_tx(struct sk_buff *skb, struct net_device *dev);
 static void ether1394_iso(struct hpsb_iso *iso);
 
 static int ether1394_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
-static int ether1394_ethtool_ioctl(struct net_device *dev, void *useraddr);
+static int ether1394_ethtool_ioctl(struct net_device *dev, void __user *useraddr);
 
 static int ether1394_write(struct hpsb_host *host, int srcid, int destid,
                           quadlet_t *data, u64 addr, size_t len, u16 flags);
@@ -1770,7 +1770,7 @@ static int ether1394_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd
 {
        switch(cmd) {
                case SIOCETHTOOL:
-                       return ether1394_ethtool_ioctl(dev, (void *) ifr->ifr_data);
+                       return ether1394_ethtool_ioctl(dev, ifr->ifr_data);
 
                case SIOCGMIIPHY:               /* Get address of MII PHY in use. */
                case SIOCGMIIREG:               /* Read MII PHY register. */
@@ -1782,11 +1782,11 @@ static int ether1394_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd
        return 0;
 }
 
-static int ether1394_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int ether1394_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        u32 ethcmd;
 
-       if (get_user(ethcmd, (u32 *)useraddr))
+       if (get_user(ethcmd, (u32 __user *)useraddr))
                return -EFAULT;
 
        switch (ethcmd) {
index 707da8106db90c9057bd61c410a450f3466cd654..ab7ee883756dee4b7d297295b3b2d970b603f976 100644 (file)
@@ -1315,7 +1315,7 @@ el3_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
  */
 
 static int
-netdev_ethtool_ioctl (struct net_device *dev, void *useraddr)
+netdev_ethtool_ioctl (struct net_device *dev, void __user *useraddr)
 {
        u32 ethcmd;
        struct el3_private *lp = netdev_priv(dev);
@@ -1323,7 +1323,7 @@ netdev_ethtool_ioctl (struct net_device *dev, void *useraddr)
        /* dev_ioctl() in ../../net/core/dev.c has already checked
           capable(CAP_NET_ADMIN), so don't bother with that here.  */
 
-       if (get_user(ethcmd, (u32 *)useraddr))
+       if (get_user(ethcmd, (u32 __user *)useraddr))
                return -EFAULT;
 
        switch (ethcmd) {
@@ -1412,7 +1412,7 @@ netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
 
        switch (cmd) {
        case SIOCETHTOOL:
-               rc = netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               rc = netdev_ethtool_ioctl(dev, rq->ifr_data);
                break;
 
        default:
index c4491dab97e208f9dcf37aa549474302116d9621..5f3ee136a2e8728078afa66ca6d696ba898ac4a1 100755 (executable)
@@ -1571,7 +1571,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
 This function handles all the  ethtool ioctls. It gives driver info, gets/sets driver speed, gets memory mapped register values, forces auto negotiation, sets/gets WOL options for ethtool application. 
 */
        
-static int amd8111e_ethtool_ioctl(struct net_device* dev, void* useraddr)
+static int amd8111e_ethtool_ioctl(struct net_device* dev, void __user *useraddr)
 {
        struct amd8111e_priv *lp = netdev_priv(dev);
        struct pci_dev *pci_dev = lp->pci_dev;
@@ -1704,7 +1704,7 @@ static int amd8111e_ioctl(struct net_device * dev , struct ifreq *ifr, int cmd)
 
        switch(cmd) {
        case SIOCETHTOOL:
-               return amd8111e_ethtool_ioctl(dev, (void *) ifr->ifr_data);
+               return amd8111e_ethtool_ioctl(dev, ifr->ifr_data);
        case SIOCGMIIPHY:
                data->phy_id = PHY_ID;
 
index 778fd075451300b48b2fd7fb3a961214b09931ff..9ed23876052562ddf90ebc031771dd963e59bae4 100644 (file)
@@ -2357,10 +2357,10 @@ static int bond_ioctl_change_active(struct net_device *bond_dev, struct net_devi
 static int bond_ethtool_ioctl(struct net_device *bond_dev, struct ifreq *ifr)
 {
        struct ethtool_drvinfo info;
-       void *addr = ifr->ifr_data;
+       void __user *addr = ifr->ifr_data;
        uint32_t cmd;
 
-       if (get_user(cmd, (uint32_t *)addr)) {
+       if (get_user(cmd, (uint32_t __user *)addr)) {
                return -EFAULT;
        }
 
@@ -3667,8 +3667,10 @@ static struct net_device_stats *bond_get_stats(struct net_device *bond_dev)
 static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd)
 {
        struct net_device *slave_dev = NULL;
-       struct ifbond *u_binfo = NULL, k_binfo;
-       struct ifslave *u_sinfo = NULL, k_sinfo;
+       struct ifbond k_binfo;
+       struct ifbond __user *u_binfo = NULL;
+       struct ifslave k_sinfo;
+       struct ifslave __user *u_sinfo = NULL;
        struct mii_ioctl_data *mii = NULL;
        int prev_abi_ver = orig_app_abi_ver;
        int res = 0;
@@ -3711,7 +3713,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
                return 0;
        case BOND_INFO_QUERY_OLD:
        case SIOCBONDINFOQUERY:
-               u_binfo = (struct ifbond *)ifr->ifr_data;
+               u_binfo = (struct ifbond __user *)ifr->ifr_data;
 
                if (copy_from_user(&k_binfo, u_binfo, sizeof(ifbond))) {
                        return -EFAULT;
@@ -3727,7 +3729,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
                return res;
        case BOND_SLAVE_INFO_QUERY_OLD:
        case SIOCBONDSLAVEINFOQUERY:
-               u_sinfo = (struct ifslave *)ifr->ifr_data;
+               u_sinfo = (struct ifslave __user *)ifr->ifr_data;
 
                if (copy_from_user(&k_sinfo, u_sinfo, sizeof(ifslave))) {
                        return -EFAULT;
index 4673bd8291e2bfedc453a53b80c3c5a2774f1c8c..c12485146336013cb57765c2c0e35aa0cacc5bc9 100644 (file)
@@ -107,7 +107,7 @@ static int change_mtu (struct net_device *dev, int new_mtu);
 static void set_multicast (struct net_device *dev);
 static struct net_device_stats *get_stats (struct net_device *dev);
 static int clear_stats (struct net_device *dev);
-static int rio_ethtool_ioctl (struct net_device *dev, void *useraddr);
+static int rio_ethtool_ioctl (struct net_device *dev, void __user *useraddr);
 static int rio_ioctl (struct net_device *dev, struct ifreq *rq, int cmd);
 static int rio_close (struct net_device *dev);
 static int find_miiphy (struct net_device *dev);
@@ -1195,7 +1195,7 @@ set_multicast (struct net_device *dev)
 }
 
 static int
-rio_ethtool_ioctl (struct net_device *dev, void *useraddr)
+rio_ethtool_ioctl (struct net_device *dev, void __user *useraddr)
 {
        struct netdev_private *np = dev->priv;
                u32 ethcmd;
@@ -1333,7 +1333,7 @@ rio_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
        phy_addr = np->phy_addr;
        switch (cmd) {
        case SIOCETHTOOL:
-               return rio_ethtool_ioctl (dev, (void *) rq->ifr_data);          
+               return rio_ethtool_ioctl(dev, rq->ifr_data);            
        case SIOCDEVPRIVATE:
                break;
        
index f460db444abe391822955cd0e562e62b224ff689..70b3adc7676745b3133f97a3b866a3e0da3a12b1 100644 (file)
@@ -2017,7 +2017,7 @@ speedo_get_stats(struct net_device *dev)
        return &sp->stats;
 }
 
-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;
        struct speedo_private *sp = netdev_priv(dev);
@@ -2129,7 +2129,7 @@ static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                pci_set_power_state(sp->pdev, saved_acpi);
                return 0;
        case SIOCETHTOOL:
-               return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return netdev_ethtool_ioctl(dev, rq->ifr_data);
        default:
                return -EOPNOTSUPP;
        }
index 3bf22730e71adc168c61f8e3bbeae573db2228c2..8c4b2a88b1899b56a4fc0816656866dc18fa7bf0 100644 (file)
@@ -1518,13 +1518,13 @@ static int __init EISA_signature(char *name, s32 eisa_id)
        return status;          /* return the device name string */
 }
 
-static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int ewrk3_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
        u_long iobase = dev->base_addr;
        u32 ethcmd;
 
-       if (get_user(ethcmd, (u32 *)useraddr))
+       if (get_user(ethcmd, (u32 __user *)useraddr))
                return -EFAULT;
 
        switch (ethcmd) {
@@ -1721,7 +1721,7 @@ static int ewrk3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
        /* ethtool IOCTLs are handled elsewhere */
        if (cmd == SIOCETHTOOL)
-               return ewrk3_ethtool_ioctl(dev, (void *)rq->ifr_data);
+               return ewrk3_ethtool_ioctl(dev, rq->ifr_data);
 
        /* Other than ethtool, all we handle are private IOCTLs */
        if (cmd != EWRK3IOCTL)
index 73dcb68830d400fd7e60d75989e08bc328f81148..503e8f6c97b23fd6e8c552642f6527d2679a07cb 100644 (file)
@@ -556,7 +556,7 @@ static struct net_device_stats *nv_get_stats(struct net_device *dev)
        return &np->stats;
 }
 
-static int nv_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int nv_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct fe_priv *np = get_nvpriv(dev);
        u8 *base = get_hwbase(dev);
@@ -634,7 +634,7 @@ static int nv_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
        switch(cmd) {
        case SIOCETHTOOL:
-               return nv_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return nv_ethtool_ioctl(dev, rq->ifr_data);
 
        default:
                return -EOPNOTSUPP;
index 2089b1a1e3d1a89a9b1894ee507604796916cea3..27c120ad6ca35e9997a02617d2b51299726500c8 100644 (file)
@@ -1869,7 +1869,7 @@ static void set_rx_mode(struct net_device *dev)
        }
 }
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct hamachi_private *np = dev->priv;
        u32 ethcmd;
@@ -1944,7 +1944,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                return -EINVAL;
 
        if (cmd == SIOCETHTOOL)
-               rc = netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               rc = netdev_ethtool_ioctl(dev, rq->ifr_data);
 
        else if (cmd == (SIOCDEVPRIVATE+3)) { /* set rx,tx intr params */
                u32 *d = (u32 *)&rq->ifr_data;
index fda18722289ef264aad5794965840019df092ef3..6b85ab3c97af53d82a9167da485b277851f21234 100644 (file)
@@ -331,7 +331,7 @@ static int bpq_set_mac_address(struct net_device *dev, void *addr)
  */
 static int bpq_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-       struct bpq_ethaddr *ethaddr = (struct bpq_ethaddr *)ifr->ifr_data;
+       struct bpq_ethaddr __user *ethaddr = ifr->ifr_data;
        struct bpqdev *bpq = dev->priv;
        struct bpq_req req;
 
index 0e6844fc339bd3a24e55bfc8e578d29f913c9984..f7fc3b9c0a5ce31c4596ed64de35a067638f8b6f 100644 (file)
@@ -1714,13 +1714,11 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        struct scc_mem_config memcfg;
        struct scc_hw_config hwcfg;
        struct scc_calibrate cal;
-       struct scc_channel *scc;
+       struct scc_channel *scc = (struct scc_channel *) dev->priv;
        int chan;
        unsigned char device_name[IFNAMSIZ];
-       void *arg;
+       void __user *arg = ifr->ifr_data;
        
-       scc = (struct scc_channel *) dev->priv;
-       arg = (void *) ifr->ifr_data;
        
        if (!Driver_Initialized)
        {
index 7bd6fe2ce5caf00f57d198338b6a633768dc98d7..605a6873eeb16f9c566c2abc5ebe22ae46d2855c 100644 (file)
@@ -362,7 +362,7 @@ ixgb_ethtool_geeprom(struct ixgb_adapter *adapter,
 
 static int
 ixgb_ethtool_seeprom(struct ixgb_adapter *adapter,
-                    struct ethtool_eeprom *eeprom, void *user_data)
+                    struct ethtool_eeprom *eeprom, void __user *user_data)
 {
        struct ixgb_hw *hw = &adapter->hw;
        uint16_t eeprom_buff[256];
@@ -457,10 +457,10 @@ ixgb_ethtool_led_blink(struct ixgb_adapter *adapter, struct ethtool_value *id)
 int ixgb_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr)
 {
        struct ixgb_adapter *adapter = netdev->priv;
-       void *addr = ifr->ifr_data;
+       void __user *addr = ifr->ifr_data;
        uint32_t cmd;
 
-       if (get_user(cmd, (uint32_t *) addr))
+       if (get_user(cmd, (uint32_t __user *) addr))
                return -EFAULT;
 
        switch (cmd) {
index 9bae8d9abcd160e19b722a52bef2bff3ee555bc7..a154b18bd25bd30fac96a34c0f910e1086528b16 100644 (file)
@@ -1961,12 +1961,12 @@ static void set_rx_mode(struct net_device *dev)
        spin_unlock_irq(&np->lock);
 }
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct netdev_private *np = dev->priv;
        u32 cmd;
 
-       if (get_user(cmd, (u32 *)useraddr))
+       if (get_user(cmd, (u32 __user *)useraddr))
                return -EFAULT;
 
        switch (cmd) {
@@ -2421,7 +2421,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
        switch(cmd) {
        case SIOCETHTOOL:
-               return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return netdev_ethtool_ioctl(dev, rq->ifr_data);
        case SIOCGMIIPHY:               /* Get address of MII PHY in use. */
        case SIOCDEVPRIVATE:            /* for binary compat, remove in 2.5 */
                data->phy_id = 1;
index 41fc5f9df01386f9e8afc4d69e372164f782ecf9..0ff2d422383649d521fb83f27b0ad31731da891f 100644 (file)
@@ -1190,7 +1190,7 @@ static struct net_device_stats *ns83820_get_stats(struct net_device *ndev)
        return &dev->stats;
 }
 
-static int ns83820_ethtool_ioctl (struct ns83820 *dev, void *useraddr)
+static int ns83820_ethtool_ioctl (struct ns83820 *dev, void __user *useraddr)
 {
        u32 ethcmd;
 
@@ -1236,7 +1236,7 @@ static int ns83820_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
 
        switch(cmd) {
        case SIOCETHTOOL:
-               return ns83820_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return ns83820_ethtool_ioctl(dev, rq->ifr_data);
 
        default:
                return -EOPNOTSUPP;
index 13ed04f1b89ca7f33a48275cbb61b0cbb67c97bc..e848b4942b99307edd503b726a9109166ad38136 100644 (file)
@@ -2119,12 +2119,12 @@ static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
     return 0;
 }
 
-static int smc_ethtool_ioctl (struct net_device *dev, void *useraddr)
+static int smc_ethtool_ioctl (struct net_device *dev, void __user *useraddr)
 {
     u32 ethcmd;
     struct smc_private *smc = netdev_priv(dev);
 
-    if (get_user(ethcmd, (u32 *)useraddr))
+    if (get_user(ethcmd, (u32 __user *)useraddr))
        return -EFAULT;
 
     switch (ethcmd) {
@@ -2229,7 +2229,7 @@ static int smc_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
     case SIOCETHTOOL:
        saved_bank = inw(ioaddr + BANK_SELECT);
        SMC_SELECT_BANK(3);
-       rc = smc_ethtool_ioctl(dev, (void *) rq->ifr_data);
+       rc = smc_ethtool_ioctl(dev, rq->ifr_data);
        SMC_SELECT_BANK(saved_bank);
        break;
 
index a6d09dd831479544e45837e8e3515b2ea0c1fce8..d77314518f2d916990f4c0e2c9c23647bec75a31 100644 (file)
@@ -1715,7 +1715,7 @@ static int rr_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                return error;
                
        case SIOCRRID:
-               return put_user(0x52523032, (int *)(&rq->ifr_data[0]));
+               return put_user(0x52523032, (int __user *)rq->ifr_data);
        default:
                return error;
        }
index 9b47edbd9783f533185506b34029409b646b7528..1f99fb1eabccb6b75051f3d083ffe4115fda8b45 100644 (file)
@@ -1997,7 +1997,7 @@ static void set_rx_mode(struct net_device *dev)
 }
 
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct ethtool_cmd ecmd;
        struct netdev_private *np = dev->priv;
@@ -2086,7 +2086,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                return -EINVAL;
 
        if (cmd == SIOCETHTOOL)
-               rc = netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               rc = netdev_ethtool_ioctl(dev, rq->ifr_data);
 
        else {
                spin_lock_irq(&np->lock);
index 838c9c50aa5f73cc13c815f3f43f6215e9649005..130f4d6954bbcae694906ce078801eaccf04ba7e 100644 (file)
@@ -1576,7 +1576,7 @@ static int __set_mac_addr(struct net_device *dev)
 }
        
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct netdev_private *np = dev->priv;
        u32 ethcmd;
@@ -1668,7 +1668,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                return -EINVAL;
 
        if (cmd == SIOCETHTOOL)
-               rc = netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               rc = netdev_ethtool_ioctl(dev, rq->ifr_data);
 
        else {
                spin_lock_irq(&np->lock);
index 0fc00edc886cecdd3f8a9680a150de371333ace4..76994b06267f1d9675dda767cdad0911dd34efc4 100644 (file)
@@ -830,7 +830,7 @@ static struct net_device_stats *tulip_get_stats(struct net_device *dev)
 }
 
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct tulip_private *np = netdev_priv(dev);
        u32 ethcmd;
@@ -866,7 +866,7 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
 
        switch (cmd) {
        case SIOCETHTOOL:
-               return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return netdev_ethtool_ioctl(dev, rq->ifr_data);
 
        case SIOCGMIIPHY:               /* Get address of MII PHY in use. */
                if (tp->mii_cnt)
index 5f6cea1b209841b74672d3d6c14edb51f1e5fe49..b4b990129d26e5eee1ae3f3be26b76ca4514b944 100644 (file)
@@ -1369,7 +1369,7 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev)
 }
 
 
-static int xircom_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int xircom_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct ethtool_cmd ecmd;
        struct xircom_private *tp = dev->priv;
@@ -1477,7 +1477,7 @@ static int xircom_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
        switch(cmd) {
        case SIOCETHTOOL:
-               return xircom_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return xircom_ethtool_ioctl(dev, rq->ifr_data);
 
        /* Legacy mii-diag interface */
        case SIOCGMIIPHY:               /* Get address of MII PHY in use. */
index 39949dbb1599bff0cb482b87853a7fa41fcdc0e7..45ab1999ded91465beaf432797e97de5a9f26cd0 100644 (file)
@@ -1162,7 +1162,7 @@ typhoon_ethtool_sset(struct typhoon *tp, struct ethtool_cmd *cmd)
 }
 
 static inline int
-typhoon_ethtool_ioctl(struct net_device *dev, void *useraddr)
+typhoon_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct typhoon *tp = (struct typhoon *) dev->priv;
        u32 ethcmd;
@@ -1237,7 +1237,7 @@ typhoon_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
        switch (cmd) {
        case SIOCETHTOOL:
-               return typhoon_ethtool_ioctl(dev, (void *) ifr->ifr_data);
+               return typhoon_ethtool_ioctl(dev, ifr->ifr_data);
        default:
                break;
        }
index 82798fd0e94d1671bf1883501461d2efefa21aa3..dd6f0ff29cedc3a6109eabca609c3fb3b62d3258 100644 (file)
@@ -229,7 +229,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
        return(ret);
 }
 
-static int dlci_config(struct net_device *dev, struct dlci_conf *conf, int get)
+static int dlci_config(struct net_device *dev, struct dlci_conf __user *conf, int get)
 {
        struct dlci_conf        config;
        struct dlci_local       *dlp;
@@ -286,7 +286,7 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                        if (!*(short *)(dev->dev_addr))
                                return(-EINVAL);
 
-                       return(dlci_config(dev, (struct dlci_conf *) ifr->ifr_data, cmd == DLCI_GET_CONF));
+                       return(dlci_config(dev, ifr->ifr_data, cmd == DLCI_GET_CONF));
                        break;
 
                default: 
index 0abba0f129063a011f7165fac62f015ab5719bc7..12598181abed54f3dcdacbac4cb3ac340dc515c9 100644 (file)
@@ -1095,7 +1095,7 @@ static int sdla_open(struct net_device *dev)
        return(0);
 }
 
-static int sdla_config(struct net_device *dev, struct frad_conf *conf, int get)
+static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, int get)
 {
        struct frad_local *flp;
        struct conf_data  data;
@@ -1193,7 +1193,7 @@ static int sdla_config(struct net_device *dev, struct frad_conf *conf, int get)
        return(0);
 }
 
-static int sdla_xfer(struct net_device *dev, struct sdla_mem *info, int read)
+static int sdla_xfer(struct net_device *dev, struct sdla_mem __user *info, int read)
 {
        struct sdla_mem mem;
        char    *temp;
@@ -1271,7 +1271,7 @@ static int sdla_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        {
                case FRAD_GET_CONF:
                case FRAD_SET_CONF:
-                       return(sdla_config(dev, (struct frad_conf *)ifr->ifr_data, cmd == FRAD_GET_CONF));
+                       return(sdla_config(dev, ifr->ifr_data, cmd == FRAD_GET_CONF));
 
                case SDLA_IDENTIFY:
                        ifr->ifr_flags = flp->type;
@@ -1306,7 +1306,7 @@ NOTE:  This is rather a useless action right now, as the
 
                case SDLA_WRITEMEM:
                case SDLA_READMEM:
-                       return(sdla_xfer(dev, (struct sdla_mem *)ifr->ifr_data, cmd == SDLA_READMEM));
+                       return(sdla_xfer(dev, ifr->ifr_data, cmd == SDLA_READMEM));
 
                case SDLA_START:
                        sdla_start(dev);
index ee328d5c2f7f4290c4e3dba58cafbe6b2e32c36a..5eb32a9ca5abfdf756ae0446cc88c012a4cc0a89 100644 (file)
@@ -1841,7 +1841,7 @@ wl_his_gather(struct net_device * dev,
 #endif /* HISTOGRAM */
 
 static inline int
-wl_netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+wl_netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        u32 ethcmd;
 
@@ -2764,7 +2764,7 @@ wavelan_ioctl(struct net_device * dev,    /* Device on wich the ioctl apply */
   switch(cmd)
     {
     case SIOCETHTOOL:
-      ret = wl_netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+      ret = wl_netdev_ethtool_ioctl(dev, rq->ifr_data);
       break;
 
       /* ------------------- OTHER IOCTL ------------------- */
index ed4acc13a7c6f1b28d47faaa8e3caad133e23c02..4e62fa630afcf54736db5888df3d57ec7797fd8d 100644 (file)
@@ -1487,7 +1487,7 @@ struct iw_statistics *wl3501_get_wireless_stats(struct net_device *dev)
        return wstats;
 }
 
-static inline int wl3501_ethtool_ioctl(struct net_device *dev, void *uaddr)
+static inline int wl3501_ethtool_ioctl(struct net_device *dev, void __user *uaddr)
 {
        u32 ethcmd;
        int rc = -EFAULT;
@@ -1532,7 +1532,7 @@ static int wl3501_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
        if (netif_device_present(dev)) {
                rc = -EOPNOTSUPP;
                if (cmd == SIOCETHTOOL)
-                       rc = wl3501_ethtool_ioctl(dev, (void *)rq->ifr_data);
+                       rc = wl3501_ethtool_ioctl(dev, rq->ifr_data);
        }
        return rc;
 }
index 9994de2d9236486be294be698eab020c4ca1ce76..b058f5a55468c9302fef357ea0907577567ca60f 100644 (file)
@@ -1405,7 +1405,7 @@ static void set_rx_mode(struct net_device *dev)
        outw(cfg_value | 0x1000, ioaddr + Cnfg);
 }
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct yellowfin_private *np = dev->priv;
        u32 ethcmd;
@@ -1437,7 +1437,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
        switch(cmd) {
        case SIOCETHTOOL:
-               return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return netdev_ethtool_ioctl(dev, rq->ifr_data);
        case SIOCGMIIPHY:               /* Get address of MII PHY in use. */
                data->phy_id = np->phys[0] & 0x1f;
                /* Fall Through */
index 77262750f897530590cf4c5a394fdd4c4288bbf9..2891eeeef61b9365a65cbeaf3656b18db8977470 100644 (file)
@@ -1651,12 +1651,12 @@ static struct net_device_stats *eth_get_stats (struct net_device *net)
        return &((struct eth_dev *) net->priv)->stats;
 }
 
-static int eth_ethtool_ioctl (struct net_device *net, void *useraddr)
+static int eth_ethtool_ioctl (struct net_device *net, void __user *useraddr)
 {
        struct eth_dev  *dev = (struct eth_dev *) net->priv;
        u32             cmd;
 
-       if (get_user (cmd, (u32 *)useraddr))
+       if (get_user (cmd, (u32 __user *)useraddr))
                return -EFAULT;
        switch (cmd) {
 
@@ -1694,7 +1694,7 @@ static int eth_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
 {
        switch (cmd) {
        case SIOCETHTOOL:
-               return eth_ethtool_ioctl (net, (void *)rq->ifr_data);
+               return eth_ethtool_ioctl(net, rq->ifr_data);
        default:
                return -EOPNOTSUPP;
        }
index d705e815acab2a52a2574536814b780ab20d82c7..de9bf863ef4955dbe26548917bdec23ce7f3b4b8 100644 (file)
@@ -672,7 +672,7 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
         struct catc *catc = dev->priv;
         u32 cmd;
         
-        if (get_user(cmd, (u32 *)useraddr))
+        if (get_user(cmd, (u32 __user *)useraddr))
                 return -EFAULT;
 
         switch (cmd) {
@@ -726,7 +726,7 @@ static int catc_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
         switch(cmd) {
         case SIOCETHTOOL:
-                return netdev_ethtool_ioctl(dev, (void __user *)rq->ifr_data);
+                return netdev_ethtool_ioctl(dev, rq->ifr_data);
         default:
                 return -EOPNOTSUPP;
         }
index d61d7d7de61d388e82926dadc32368656eb56720..42a248f8f189f86daa7f7f57d3d8a3af2ce6f494 100644 (file)
@@ -737,7 +737,7 @@ static int kaweth_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
 {
        switch (cmd) {
        case SIOCETHTOOL:
-               return netdev_ethtool_ioctl(net, (void __user *)rq->ifr_data);
+               return netdev_ethtool_ioctl(net, rq->ifr_data);
        }
        return -EOPNOTSUPP;
 }
index 917482501ffe9b5e0816e271ae0014f23c3455df..4cdcab3b851724381be25debab76a99be0d6f5ae 100644 (file)
@@ -1113,7 +1113,7 @@ static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
 
        switch (cmd) {
        case SIOCETHTOOL:
-               res = pegasus_ethtool_ioctl(net, (void __user *)rq->ifr_data);
+               res = pegasus_ethtool_ioctl(net, rq->ifr_data);
                break;
        case SIOCDEVPRIVATE:
                data[0] = pegasus->phy;
index 52592ef1d1197b6a49fca5bd563ad39dcae9b64a..45d594717281d6ecdea683f1da27c94307001649 100644 (file)
@@ -776,13 +776,13 @@ static int rtl8150_close(struct net_device *netdev)
        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;
        int cmd;
 
        dev = netdev->priv;
-       if (get_user(cmd, (int *) uaddr))
+       if (get_user(cmd, (int __user *) uaddr))
                return -EFAULT;
 
        switch (cmd) {
index fbe0106910b7678d15b3ab9ca2ce3f9893375c6b..1e99c4f6bd97570b5850e04c71521b34082f9d0a 100644 (file)
@@ -147,7 +147,7 @@ struct ifreq
                struct  ifmap ifru_map;
                char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
                char    ifru_newname[IFNAMSIZ];
-               char __user *   ifru_data;
+               void __user *   ifru_data;
                struct  if_settings ifru_settings;
        } ifr_ifru;
 };