[PATCH v2 net-next 04/12] net: ethtool: fix __ethtool_dev_mm_supported() implementation

Vladimir Oltean posted 12 patches 2 years, 6 months ago
There is a newer version of this series
[PATCH v2 net-next 04/12] net: ethtool: fix __ethtool_dev_mm_supported() implementation
Posted by Vladimir Oltean 2 years, 6 months ago
The MAC Merge layer is supported when ops->get_mm() returns 0.
The implementation was changed during review, and in this process, a bug
was introduced.

Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230111161706.1465242-5-vladimir.oltean@nxp.com/
Fixes: 04692c9020b7 ("net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC)")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
v1->v2: none

 net/ethtool/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c
index e612856eed8c..fce3cc2734f9 100644
--- a/net/ethtool/mm.c
+++ b/net/ethtool/mm.c
@@ -247,5 +247,5 @@ bool __ethtool_dev_mm_supported(struct net_device *dev)
 	if (ops && ops->get_mm)
 		ret = ops->get_mm(dev, &state);
 
-	return !!ret;
+	return !ret;
 }
-- 
2.34.1
Re: [PATCH v2 net-next 04/12] net: ethtool: fix __ethtool_dev_mm_supported() implementation
Posted by Kurt Kanzenbach 2 years, 6 months ago
On Sun Feb 19 2023, Vladimir Oltean wrote:
> The MAC Merge layer is supported when ops->get_mm() returns 0.
> The implementation was changed during review, and in this process, a bug
> was introduced.
>
> Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230111161706.1465242-5-vladimir.oltean@nxp.com/

Nit:

Link: https://lore.kernel.org/r/20230111161706.1465242-5-vladimir.oltean@nxp.com/

is preferred, because it is supposed to be stable. Same for patch #8.

Thanks,
Kurt
Re: [PATCH v2 net-next 04/12] net: ethtool: fix __ethtool_dev_mm_supported() implementation
Posted by Vladimir Oltean 2 years, 6 months ago
On Mon, Feb 20, 2023 at 12:50:35PM +0100, Kurt Kanzenbach wrote:
> On Sun Feb 19 2023, Vladimir Oltean wrote:
> > The MAC Merge layer is supported when ops->get_mm() returns 0.
> > The implementation was changed during review, and in this process, a bug
> > was introduced.
> >
> > Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230111161706.1465242-5-vladimir.oltean@nxp.com/
> 
> Nit:
> 
> Link: https://lore.kernel.org/r/20230111161706.1465242-5-vladimir.oltean@nxp.com/
> 
> is preferred, because it is supposed to be stable. Same for patch #8.
> 
> Thanks,
> Kurt

Thanks for taking a look, I've made the change.
FWIW, your /r/ link redirected me to /all/. I've replaced it with /netdev/.