[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409174433.7b3d0f29@kernel.org>
Date: Wed, 9 Apr 2025 17:44:33 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <sdf@...ichev.me>
Cc: 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 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;
Powered by blists - more mailing lists