[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130218170126.GA1576@minipsycho.orion>
Date: Mon, 18 Feb 2013 18:01:26 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Cong Wang <amwang@...hat.com>
Cc: netdev@...r.kernel.org, Eric Dumazet <eric.dumazet@...il.com>,
Vlad Yasevich <vyasevic@...hat.com>,
Stephen Hemminger <stephen@...workplumber.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next v5] netpoll: fix some sparse warnings in various
places
Mon, Feb 18, 2013 at 04:22:29AM CET, amwang@...hat.com wrote:
>From: Cong Wang <amwang@...hat.com>
>
>This fixes sparse warnings like the one below:
>
>drivers/net/team/team.c:953:25: warning: incorrect type in return expression (different address spaces)
>drivers/net/team/team.c:953:25: expected struct netpoll_info *
>drivers/net/team/team.c:953:25: got struct netpoll_info [noderef] <asn:4>*npinfo
>
>and make these functions return bool as suggested by Jiri.
>
>Cc: Eric Dumazet <eric.dumazet@...il.com>
>Cc: Jiri Pirko <jiri@...nulli.us>
>Cc: Vlad Yasevich <vyasevic@...hat.com>
>Cc: Stephen Hemminger <stephen@...workplumber.org>
>Cc: David S. Miller <davem@...emloft.net>
>Signed-off-by: Cong Wang <amwang@...hat.com>
>
>---
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 94c1534..2263bf2 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -1300,9 +1300,9 @@ static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, g
> return err;
> }
>
>-static struct netpoll_info *bond_netpoll_info(struct bonding *bond)
>+static bool bond_netpoll_info(struct bonding *bond)
> {
>- return bond->dev->npinfo;
>+ return rcu_access_pointer(bond->dev->npinfo) != NULL;
^^^^^^^^
this is not necessary
(sorry for nitpick)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists