From: Joe Perches <joe@perches•com>
To: Ian Morris <ipm@chirality•org.uk>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next v2] ipv6: coding style improvements (remove assignment in if statements)
Date: Sun, 23 Nov 2014 13:50:09 -0800 [thread overview]
Message-ID: <1416779409.6651.60.camel@perches.com> (raw)
In-Reply-To: <1416778123-5803-1-git-send-email-ipm@chirality.org.uk>
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"
next prev parent reply other threads:[~2014-11-23 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-23 21:28 [PATCH net-next v2] ipv6: coding style improvements (remove assignment in if statements) Ian Morris
2014-11-23 21:50 ` Joe Perches [this message]
2014-11-24 2:01 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416779409.6651.60.camel@perches.com \
--to=joe@perches$(echo .)com \
--cc=ipm@chirality$(echo .)org.uk \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox