Re: [PATCH net] bonding: hold ops lock around get_link
From: Jakub Kicinski
Date: Wed Apr 09 2025 - 20:44:45 EST
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;