Cleanup sparse warnings in the bonding driver.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- pro-2.6.orig/drivers/net/bonding/bond_main.c
+++ pro-2.6/drivers/net/bonding/bond_main.c
@@ -593,7 +593,7 @@ static int bond_update_speed_duplex(stru
        ioctl = slave_dev->do_ioctl;
        strncpy(ifr.ifr_name, slave_dev->name, IFNAMSIZ);
        etool.cmd = ETHTOOL_GSET;
-       ifr.ifr_data = (char*)&etool;
+       ifr.ifr_data = (void __user *) &etool;
        if (!ioctl || (IOCTL(slave_dev, &ifr, SIOCETHTOOL) < 0)) {
                return -1;
        }
@@ -690,7 +690,7 @@ static int bond_check_dev_link(struct bo
        if (ioctl) {
                strncpy(ifr.ifr_name, slave_dev->name, IFNAMSIZ);
                etool.cmd = ETHTOOL_GLINK;
-               ifr.ifr_data = (char*)&etool;
+               ifr.ifr_data = (void __user *) &etool;
                if (IOCTL(slave_dev, &ifr, SIOCETHTOOL) == 0) {
                        if (etool.data == 1) {
                                return BMSR_LSTATUS;
--- pro-2.6.orig/drivers/net/bonding/bond_sysfs.c
+++ pro-2.6/drivers/net/bonding/bond_sysfs.c
@@ -260,7 +260,7 @@ static ssize_t bonding_store_slaves(stru
        char *ifname;
        int i, res, found, ret = count;
        struct slave *slave;
-       struct net_device *dev = 0;
+       struct net_device *dev = NULL;
        struct bonding *bond = to_bond(cd);
 
        /* Quick sanity check -- is the bond interface up? */
@@ -995,8 +995,8 @@ static ssize_t bonding_store_primary(str
                        printk(KERN_INFO DRV_NAME
                               ": %s: Setting primary slave to None.\n",
                               bond->dev->name);
-                       bond->primary_slave = 0;
-                               bond_select_active_slave(bond);
+                       bond->primary_slave = NULL;
+                       bond_select_active_slave(bond);
                } else {
                        printk(KERN_INFO DRV_NAME
                               ": %s: Unable to set %.*s as primary slave as it 
is not a slave.\n",
@@ -1123,8 +1123,8 @@ static ssize_t bonding_store_active_slav
                        printk(KERN_INFO DRV_NAME
                               ": %s: Setting active slave to None.\n",
                               bond->dev->name);
-                       bond->primary_slave = 0;
-                               bond_select_active_slave(bond);
+                       bond->primary_slave = NULL;
+                       bond_select_active_slave(bond);
                } else {
                        printk(KERN_INFO DRV_NAME
                               ": %s: Unable to set %.*s as active slave as it 
is not a slave.\n",

--
Stephen Hemminger <[EMAIL PROTECTED]>
OSDL http://developer.osdl.org/~shemminger

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to