All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Stanislav Fomichev <sdf@fomichev.me>,
	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: Thu, 10 Apr 2025 08:46:27 -0700	[thread overview]
Message-ID: <Z_fn0yCuj3BI31ie@mini-arch> (raw)
In-Reply-To: <20250409174433.7b3d0f29@kernel.org>

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..

      reply	other threads:[~2025-04-10 15:46 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
2025-04-10 15:46   ` Stanislav Fomichev [this message]

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=Z_fn0yCuj3BI31ie@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.