Re: [PATCH net] bonding: hold ops lock around get_link
From: Stanislav Fomichev
Date: Thu Apr 10 2025 - 11:50:13 EST
On 04/09, Jakub Kicinski wrote:
> On Tue, 8 Apr 2025 10:14:51 -0700 Stanislav Fomichev wrote:
> > + netdev_lock_ops(slave_dev);
> > + ret = slave_dev->ethtool_ops->get_link(slave_dev) ?
> > BMSR_LSTATUS : 0;
> > + netdev_unlock_ops(slave_dev);
> > +
> > + return ret;
>
> Is it okay to nit pick? Since you have a temp now it's cleaner to move
> the ternary operator later, avoid the line break:
>
> netdev_lock_ops(slave_dev);
> ret = slave_dev->ethtool_ops->get_link(slave_dev);
> netdev_unlock_ops(slave_dev);
>
> return ret ? BMSR_LSTATUS : 0;
Nits are always welcome :-) Will repost shortly..