Browse Source

bonding: fix sparse warning

Fix use of zero where NULL expected. And wrap long line.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger 14 năm trước cách đây
mục cha
commit
4ec952b8ab
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      drivers/net/bonding/bonding.h

+ 3 - 2
drivers/net/bonding/bonding.h

@@ -269,7 +269,8 @@ struct bonding {
  *
  *
  * Caller must hold bond lock for read
  * 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;
 	struct slave *slave = NULL;
 	int i;
 	int i;
@@ -280,7 +281,7 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct n
 		}
 		}
 	}
 	}
 
 
-	return 0;
+	return NULL;
 }
 }
 
 
 static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
 static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)