From: Jakub Kicinski <kuba@kernel.org>
To: Stanislav Fomichev <sdf@fomichev.me>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, jv@jvosburgh.net, andrew+netdev@lunn.ch,
linux-kernel@vger.kernel.org,
syzbot+48c14f61594bdfadb086@syzkaller.appspotmail.com
Subject: Re: [PATCH net] bonding: hold ops lock around get_link
Date: Wed, 9 Apr 2025 17:44:33 -0700 [thread overview]
Message-ID: <20250409174433.7b3d0f29@kernel.org> (raw)
In-Reply-To: <20250408171451.2278366-1-sdf@fomichev.me>
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;
next prev parent reply other threads:[~2025-04-10 0:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 17:14 [PATCH net] bonding: hold ops lock around get_link Stanislav Fomichev
2025-04-09 1:54 ` Hangbin Liu
2025-04-10 0:44 ` Jakub Kicinski [this message]
2025-04-10 15:46 ` Stanislav Fomichev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250409174433.7b3d0f29@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jv@jvosburgh.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=syzbot+48c14f61594bdfadb086@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).