[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_fn0yCuj3BI31ie@mini-arch>
Date: Thu, 10 Apr 2025 08:46:27 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <sdf@...ichev.me>, netdev@...r.kernel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
jv@...sburgh.net, andrew+netdev@...n.ch,
linux-kernel@...r.kernel.org,
syzbot+48c14f61594bdfadb086@...kaller.appspotmail.com
Subject: Re: [PATCH net] bonding: hold ops lock around get_link
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..
Powered by blists - more mailing lists