* [PATCH] ethtool: use phydev variable
@ 2022-01-05 14:10 trix
2022-01-05 15:00 ` Andrew Lunn
2022-01-06 12:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: trix @ 2022-01-05 14:10 UTC (permalink / raw)
To: davem, kuba, leon, arnd, danieller, gustavoars, hkallweit1, andrew
Cc: netdev, linux-kernel, Tom Rix
From: Tom Rix <trix@redhat.com>
In ethtool_get_phy_stats(), the phydev varaible is set to
dev->phydev but dev->phydev is still used. Replace
dev->phydev uses with phydev.
Signed-off-by: Tom Rix <trix@redhat.com>
---
net/ethtool/ioctl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index b2cdba1b4aaec..326e14ee05dbf 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -2096,9 +2096,9 @@ static int ethtool_get_phy_stats(struct net_device *dev, void __user *useraddr)
if (!phydev && (!ops->get_ethtool_phy_stats || !ops->get_sset_count))
return -EOPNOTSUPP;
- if (dev->phydev && !ops->get_ethtool_phy_stats &&
+ if (phydev && !ops->get_ethtool_phy_stats &&
phy_ops && phy_ops->get_sset_count)
- n_stats = phy_ops->get_sset_count(dev->phydev);
+ n_stats = phy_ops->get_sset_count(phydev);
else
n_stats = ops->get_sset_count(dev, ETH_SS_PHY_STATS);
if (n_stats < 0)
@@ -2117,9 +2117,9 @@ static int ethtool_get_phy_stats(struct net_device *dev, void __user *useraddr)
if (!data)
return -ENOMEM;
- if (dev->phydev && !ops->get_ethtool_phy_stats &&
+ if (phydev && !ops->get_ethtool_phy_stats &&
phy_ops && phy_ops->get_stats) {
- ret = phy_ops->get_stats(dev->phydev, &stats, data);
+ ret = phy_ops->get_stats(phydev, &stats, data);
if (ret < 0)
goto out;
} else {
--
2.26.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ethtool: use phydev variable
2022-01-05 14:10 [PATCH] ethtool: use phydev variable trix
@ 2022-01-05 15:00 ` Andrew Lunn
2022-01-06 12:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2022-01-05 15:00 UTC (permalink / raw)
To: trix
Cc: davem, kuba, leon, arnd, danieller, gustavoars, hkallweit1,
netdev, linux-kernel
On Wed, Jan 05, 2022 at 06:10:20AM -0800, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> In ethtool_get_phy_stats(), the phydev varaible is set to
> dev->phydev but dev->phydev is still used. Replace
> dev->phydev uses with phydev.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ethtool: use phydev variable
2022-01-05 14:10 [PATCH] ethtool: use phydev variable trix
2022-01-05 15:00 ` Andrew Lunn
@ 2022-01-06 12:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-06 12:40 UTC (permalink / raw)
To: Tom Rix
Cc: davem, kuba, leon, arnd, danieller, gustavoars, hkallweit1,
andrew, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 5 Jan 2022 06:10:20 -0800 you wrote:
> From: Tom Rix <trix@redhat.com>
>
> In ethtool_get_phy_stats(), the phydev varaible is set to
> dev->phydev but dev->phydev is still used. Replace
> dev->phydev uses with phydev.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
>
> [...]
Here is the summary with links:
- ethtool: use phydev variable
https://git.kernel.org/netdev/net-next/c/ccd21ec5b8dd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-06 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 14:10 [PATCH] ethtool: use phydev variable trix
2022-01-05 15:00 ` Andrew Lunn
2022-01-06 12:40 ` patchwork-bot+netdevbpf
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.