[PATCH net-next v6 1/2] net: ethtool: Introduce per-PHY DUMP operations
Maxime Chevallier
maxime.chevallier at bootlin.com
Fri Apr 18 00:00:16 PDT 2025
Hi Paolo,
On Thu, 17 Apr 2025 12:03:43 +0200
Paolo Abeni <pabeni at redhat.com> wrote:
> On 4/15/25 10:51 AM, Maxime Chevallier wrote:
> > +static int ethnl_perphy_dump_all_dev(struct sk_buff *skb,
> > + struct ethnl_perphy_dump_ctx *ctx,
> > + const struct genl_info *info)
> > +{
> > + struct ethnl_dump_ctx *ethnl_ctx = &ctx->ethnl_ctx;
> > + struct net *net = sock_net(skb->sk);
> > + struct net_device *dev;
> > + int ret = 0;
> > +
> > + rcu_read_lock();
> > + for_each_netdev_dump(net, dev, ethnl_ctx->pos_ifindex) {
> > + dev_hold(dev);
>
> Minor nit: please use netdev_hold() instead.
Will do, I didn't see the notice about using netdev_hold instead in the
doc, I merely used the current ethnl_default_dumpit() as a reference,
and it uses dev_hold() as well.
should I convert it to netdev_hold() along the way in v3 ?
Maxime
More information about the linux-arm-kernel
mailing list