Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735378
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check() |
| Date | 2017-09-20 03:10 +0200 |
| Message-ID | <urBGx-4oR-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Instead of open coding the check.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
net/dsa/slave.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index d51b10450e1b..6fc9eb094267 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1294,7 +1294,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
{
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
- if (dev->netdev_ops != &dsa_slave_netdev_ops)
+ if (!dsa_slave_dev_check(dev))
return NOTIFY_DONE;
if (event == NETDEV_CHANGEUPPER)
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH net-next] net: dsa: Utilize dsa_slave_dev_check() Florian Fainelli <f.fainelli@gmail.com> - 2017-09-20 03:10 +0200 Re: [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check() Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-09-20 16:30 +0200 Re: [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check() David Miller <davem@davemloft.net> - 2017-09-21 00:50 +0200
csiph-web