Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735378 > unrolled thread
| Started by | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| First post | 2017-09-20 03:10 +0200 |
| Last post | 2017-09-21 00:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[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
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-09-20 03:10 +0200 |
| Subject | [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check() |
| Message-ID | <urBGx-4oR-3@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-09-20 16:30 +0200 |
| Message-ID | <urOaJ-4ey-1@gated-at.bofh.it> |
| In reply to | #1735378 |
Hi Florian, Florian Fainelli <f.fainelli@gmail.com> writes: > Instead of open coding the check. > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> If we do need to use it outside one day, we may think about renaming netdev_uses_dsa() to netdev_is_dsa_master() and renaming dsa_slave_dev_check() to netdev_is_dsa_slave(). In the meantime, looks good! Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-09-21 00:50 +0200 |
| Message-ID | <urVYC-MK-7@gated-at.bofh.it> |
| In reply to | #1735378 |
From: Florian Fainelli <f.fainelli@gmail.com> Date: Tue, 19 Sep 2017 18:00:37 -0700 > Instead of open coding the check. > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Applied, thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web