提交 3418db7c 编写于 作者: L Luiz Fernando Capitulino 提交者: Jeff Garzik

[PATCH] bonding: Sparse warnings fix

drivers/net/bonding/bond_sysfs.c:263:27: warning: Using plain integer as NULL pointer
drivers/net/bonding/bond_sysfs.c:998:26: warning: Using plain integer as NULL pointer
drivers/net/bonding/bond_sysfs.c:1126:26: warning: Using plain integer as NULL pointer
Signed-off-by: NLuiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 a0de3adf
...@@ -260,7 +260,7 @@ static ssize_t bonding_store_slaves(struct class_device *cd, const char *buffer, ...@@ -260,7 +260,7 @@ static ssize_t bonding_store_slaves(struct class_device *cd, const char *buffer,
char *ifname; char *ifname;
int i, res, found, ret = count; int i, res, found, ret = count;
struct slave *slave; struct slave *slave;
struct net_device *dev = 0; struct net_device *dev = NULL;
struct bonding *bond = to_bond(cd); struct bonding *bond = to_bond(cd);
/* Quick sanity check -- is the bond interface up? */ /* Quick sanity check -- is the bond interface up? */
...@@ -995,7 +995,7 @@ static ssize_t bonding_store_primary(struct class_device *cd, const char *buf, s ...@@ -995,7 +995,7 @@ static ssize_t bonding_store_primary(struct class_device *cd, const char *buf, s
printk(KERN_INFO DRV_NAME printk(KERN_INFO DRV_NAME
": %s: Setting primary slave to None.\n", ": %s: Setting primary slave to None.\n",
bond->dev->name); bond->dev->name);
bond->primary_slave = 0; bond->primary_slave = NULL;
bond_select_active_slave(bond); bond_select_active_slave(bond);
} else { } else {
printk(KERN_INFO DRV_NAME printk(KERN_INFO DRV_NAME
...@@ -1123,7 +1123,7 @@ static ssize_t bonding_store_active_slave(struct class_device *cd, const char *b ...@@ -1123,7 +1123,7 @@ static ssize_t bonding_store_active_slave(struct class_device *cd, const char *b
printk(KERN_INFO DRV_NAME printk(KERN_INFO DRV_NAME
": %s: Setting active slave to None.\n", ": %s: Setting active slave to None.\n",
bond->dev->name); bond->dev->name);
bond->primary_slave = 0; bond->primary_slave = NULL;
bond_select_active_slave(bond); bond_select_active_slave(bond);
} else { } else {
printk(KERN_INFO DRV_NAME printk(KERN_INFO DRV_NAME
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册