public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Krister Johansen <kjlx@templeofstupid•com>
To: Aaron Conole <aconole@redhat•com>
Cc: David Miller <davem@davemloft•net>,
	kjlx@templeofstupid•com, maheshb@google•com,
	netdev@vger•kernel.org
Subject: Re: [PATCH] Ipvlan should return an error when an address is already in use.
Date: Wed, 4 Jan 2017 02:09:01 -0800	[thread overview]
Message-ID: <20170104100901.GF3009@templeofstupid.com> (raw)
In-Reply-To: <f7ta8b87xqc.fsf@redhat.com>

On Tue, Jan 03, 2017 at 02:24:43PM -0500, Aaron Conole wrote:
> David Miller <davem@davemloft•net> writes:
> 
> > From: Aaron Conole <aconole@redhat•com>
> > Date: Tue, 03 Jan 2017 10:50:00 -0500
> >
> >>> @@ -489,7 +490,12 @@ static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh,
> >>>  	   Notifier will trigger FIB update, so that
> >>>  	   listeners of netlink will know about new ifaddr */
> >>>  	rtmsg_ifa(RTM_NEWADDR, ifa, nlh, portid);
> >>> -	blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa);
> >>> +	ret = blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa);
> >> 
> >> Why are you doing this assignment if you aren't using the result?
> >> 
> >>> +	ret = notifier_to_errno(ret);
> >>> +	if (ret) {
> >>> +		__inet_del_ifa(in_dev, ifap, 1, NULL, portid);
> >>> +		return ret;
> >>> +	}
> >
> > 'ret' assignment is being used, via notifier_to_errno().
> 
> d'oh!  should have had more coffee - sorry for the noise.

No worries, and thanks for taking a look.  That was from checkpatch,
which complained when I wrote it as:

	if ((ret = notifier_to_errno(ret)) != 0) {

-K

      reply	other threads:[~2017-01-04 10:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-31  4:10 [PATCH] Ipvlan should return an error when an address is already in use Krister Johansen
2017-01-02  3:26 ` David Miller
2017-01-04 10:04   ` Krister Johansen
2017-06-08 20:12   ` [PATCH v2 net-next] " Krister Johansen
2017-06-09 16:26     ` David Miller
2017-06-09 17:13       ` Krister Johansen
2017-06-09 17:15         ` David Miller
2017-06-09 17:25           ` Krister Johansen
2017-01-03 15:50 ` [PATCH] " Aaron Conole
2017-01-03 15:55   ` David Miller
2017-01-03 19:24     ` Aaron Conole
2017-01-04 10:09       ` Krister Johansen [this message]

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=20170104100901.GF3009@templeofstupid.com \
    --to=kjlx@templeofstupid$(echo .)com \
    --cc=aconole@redhat$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=maheshb@google$(echo .)com \
    --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