[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1416779409.6651.60.camel@perches.com>
Date: Sun, 23 Nov 2014 13:50:09 -0800
From: Joe Perches <joe@...ches.com>
To: Ian Morris <ipm@...rality.org.uk>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] ipv6: coding style improvements (remove
assignment in if statements)
On Sun, 2014-11-23 at 21:28 +0000, Ian Morris wrote:
> This change has no functional impact and simply addresses some coding
> style issues detected by checkpatch. Specifically this change
> adjusts "if" statements which also include the assignment of a
> variable.
Unrelated trivia:
> net/ipv6/addrconf.c | 12 ++++++++----
[]
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
[]
> @@ -2690,7 +2691,8 @@ static void init_loopback(struct net_device *dev)
>
> ASSERT_RTNL();
>
> - if ((idev = ipv6_find_idev(dev)) == NULL) {
> + idev = ipv6_find_idev(dev);
> + if (idev == NULL) {
> pr_debug("%s: add_dev failed\n", __func__);
> return;
> }
> @@ -2813,7 +2815,8 @@ static void addrconf_sit_config(struct net_device *dev)
> * our v4 addrs in the tunnel
> */
>
> - if ((idev = ipv6_find_idev(dev)) == NULL) {
> + idev = ipv6_find_idev(dev);
> + if (idev == NULL) {
> pr_debug("%s: add_dev failed\n", __func__);
> return;
> }
> @@ -2837,7 +2840,8 @@ static void addrconf_gre_config(struct net_device *dev)
>
> ASSERT_RTNL();
>
> - if ((idev = ipv6_find_idev(dev)) == NULL) {
> + idev = ipv6_find_idev(dev);
> + if (idev == NULL) {
> pr_debug("%s: add_dev failed\n", __func__);
> return;
> }
It looks like these should not be "add_dev failed"
but "ipv6_find_idev failed"
--
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