bonding: fix sparse warning
Subsystems (3)
PATCH 1/1 bonding: fix sparse warning
Fix use of zero where NULL expected. And wrap long line.
Signed-off-by Stephen Hemminger <[email protected]>
drivers/net/bonding/bonding.h +3 -2
@@ -265,7 +265,8 @@ struct bonding {* * Caller must hold bond lock for read */ -static inline struct slave *bond_get_slave_by_dev (struct bonding *bond,struct net_device *slave_dev) +static inline struct slave *bond_get_slave_by_dev (struct bonding *bond, +struct net_device *slave_dev) {struct slave *slave =NULL ;int i;
@@ -276,7 +277,7 @@ static inline struct slave *bond_get_sla } } -return 0 ; +return NULL ; }static inline struct bonding *bond_get_bond_by_slave (struct slave *slave)
Quoted 3 lines · Stephen Hemminger
Fix use of zero where NULL expected. And wrap long line.
Signed-off-by Stephen Hemminger <[email protected]>
Signed-off-by Jay Vosburgh <[email protected]>
Quoted 21 lines
drivers/net/bonding/bonding.h +3
-2@@ -265,7 +265,8 @@ struct bonding {* * Caller must hold bond lock for read */ -static inline struct slave *bond_get_slave_by_dev (struct bonding *bond,struct net_device *slave_dev) +static inline struct slave *bond_get_slave_by_dev (struct bonding *bond, +struct net_device *slave_dev) {struct slave *slave =NULL ;int i;@@ -276,7 +277,7 @@ static inline struct slave *bond_get_sla } } -return 0 ; +return NULL ; }static inline struct bonding *bond_get_bond_by_slave (struct slave *slave)
From: Stephen Hemminger <[email protected]>
Date: Wed, 23 Feb 2011 09:40:33 -0800
Quoted 3 lines
Fix use of zero where NULL expected. And wrap long line.
Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks.