* [PATCH] bonding: fix sparse warning
@ 2011-02-23 17:40 Stephen Hemminger
2011-02-23 22:29 ` Jay Vosburgh
2011-02-28 20:40 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2011-02-23 17:40 UTC (permalink / raw)
To: Jay Vosburgh, David Miller; +Cc: netdev
Fix use of zero where NULL expected. And wrap long line.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/bonding/bonding.h 2011-02-23 09:33:39.493248155 -0800
+++ b/drivers/net/bonding/bonding.h 2011-02-23 09:33:48.825356637 -0800
@@ -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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bonding: fix sparse warning
2011-02-23 17:40 [PATCH] bonding: fix sparse warning Stephen Hemminger
@ 2011-02-23 22:29 ` Jay Vosburgh
2011-02-28 20:40 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jay Vosburgh @ 2011-02-23 22:29 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
Stephen Hemminger <shemminger@vyatta.com> wrote:
>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>
>--- a/drivers/net/bonding/bonding.h 2011-02-23 09:33:39.493248155 -0800
>+++ b/drivers/net/bonding/bonding.h 2011-02-23 09:33:48.825356637 -0800
>@@ -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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bonding: fix sparse warning
2011-02-23 17:40 [PATCH] bonding: fix sparse warning Stephen Hemminger
2011-02-23 22:29 ` Jay Vosburgh
@ 2011-02-28 20:40 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-02-28 20:40 UTC (permalink / raw)
To: shemminger; +Cc: fubar, netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 23 Feb 2011 09:40:33 -0800
> Fix use of zero where NULL expected. And wrap long line.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-28 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 17:40 [PATCH] bonding: fix sparse warning Stephen Hemminger
2011-02-23 22:29 ` Jay Vosburgh
2011-02-28 20:40 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.