All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>,
	cphealy@gmail.com
Subject: Re: [PATCH net-next 2/6] net: dsa: simplify netdevice events handling
Date: Fri, 3 Feb 2017 18:43:35 -0800	[thread overview]
Message-ID: <ddcb0439-73f1-fe66-cacb-ab01f2146fe2@gmail.com> (raw)
In-Reply-To: <20170203182021.14246-3-vivien.didelot@savoirfairelinux.com>



On 02/03/2017 10:20 AM, Vivien Didelot wrote:
> Simplify the code handling the slave netdevice notifier call by
> providing a dsa_slave_changeupper helper for NETDEV_CHANGEUPPER, and so
> on (only this event is supported at the moment.)
> 
> Return NOTIFY_DONE when we did not care about an event, and NOTIFY_OK
> when we were concerned but no error occurred, as the API suggests.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---

>  static int dsa_slave_netdevice_event(struct notifier_block *nb,
> @@ -1529,8 +1514,11 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
>  {
>  	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
>  
> -	if (dsa_slave_dev_check(dev))
> -		return dsa_slave_port_event(dev, event, ptr);
> +	if (dev->netdev_ops != &dsa_slave_netdev_ops)
> +		return NOTIFY_DONE;

Why not keep the dsa_slave_dev_check() here?


-- 
Florian

  reply	other threads:[~2017-02-04  2:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 18:20 [PATCH net-next 0/6] net: dsa: add fabric notifier Vivien Didelot
2017-02-03 18:20 ` [PATCH net-next 1/6] net: dsa: move netdevice notifier registration Vivien Didelot
2017-02-03 18:20 ` [PATCH net-next 2/6] net: dsa: simplify netdevice events handling Vivien Didelot
2017-02-04  2:43   ` Florian Fainelli [this message]
2017-02-04 16:13     ` Vivien Didelot
2017-02-03 18:20 ` [PATCH net-next 3/6] net: dsa: rollback bridging on error Vivien Didelot
2017-02-03 18:20 ` [PATCH net-next 4/6] net: dsa: change state setter scope Vivien Didelot
2017-02-03 18:20 ` [PATCH net-next 5/6] net: dsa: add switch notifier Vivien Didelot
2017-02-03 18:20 ` [PATCH net-next 6/6] net: dsa: introduce bridge notifier Vivien Didelot
2017-02-04 17:55   ` Andrew Lunn
2017-02-04 18:26     ` Vivien Didelot
2017-02-04 18:30       ` Andrew Lunn
2017-02-06 21:56 ` [PATCH net-next 0/6] net: dsa: add fabric notifier 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=ddcb0439-73f1-fe66-cacb-ab01f2146fe2@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.