linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	Raphael Norwitz <raphael.norwitz@nutanix.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Amey Narkhede <ameynarkhede03@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: merge slot and bus reset implementations
Date: Wed, 7 Apr 2021 10:59:31 +0300	[thread overview]
Message-ID: <YG1mY7HfMD6zIKJV@unreal> (raw)
In-Reply-To: <YG1j7+Mj4IiparPe@rocinante>

On Wed, Apr 07, 2021 at 09:49:03AM +0200, Krzysztof Wilczyński wrote:
> [+cc Greg for visibility]
> 
> Hello,
> 
> [...]
> > > > > > The previous coding style is preferable one in the Linux kernel.
> > > > > > int rc = pci_dev_reset_slot_function(dev, probe);
> > > > > > if (rc != -ENOTTY)
> > > > > >   return rc;
> > > > > > return pci_parent_bus_reset(dev, probe);  
> > > > > 
> > > > > 
> > > > > That'd be news to me, do you have a reference?  I've never seen
> > > > > complaints for ternaries previously.  Thanks,  
> > > > 
> > > > The complaint is not to ternaries, but to the function call as one of
> > > > the parameters, that makes it harder to read.
> > > 
> > > Sorry, I don't find a function call as a parameter to a ternary to be
> > > extraordinary, nor do I find it to be a discouraged usage model within
> > > the kernel.  This seems like a pretty low bar for hard to read code.
> > 
> > It is up to us where this bar is set.
> 
> The only person who ever pulled my ear, so to speak, over using ternary
> was Greg as a bad style where, especially where it does not need to be
> used.

Good to hear that I'm not alone.

> 
> But, I digress.  I humbly think that we should move back on track and
> finish review of Raphael's patch.  Would use a ternary here be
> a show-stopper?

Of course no, I would fix it locally when apply.

Thanks

> 
> Krzysztof

  reply	other threads:[~2021-04-07  7:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  5:37 [PATCH] PCI: merge slot and bus reset implementations Raphael Norwitz
2021-04-01 12:27 ` Leon Romanovsky
2021-04-01 16:56   ` Alex Williamson
2021-04-04  8:04     ` Leon Romanovsky
2021-04-06 14:16       ` Alex Williamson
2021-04-07  7:23         ` Leon Romanovsky
2021-04-07  7:49           ` Krzysztof Wilczyński
2021-04-07  7:59             ` Leon Romanovsky [this message]
2021-04-07  8:23           ` ameynarkhede03
2021-04-07 12:30             ` Leon Romanovsky
2021-04-07 13:06               ` ameynarkhede03
2021-04-07 13:37                 ` Leon Romanovsky
2021-04-07 13:43                   ` ameynarkhede03
2021-04-08 18:38                   ` Raphael Norwitz

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=YG1mY7HfMD6zIKJV@unreal \
    --to=leon@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=ameynarkhede03@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=raphael.norwitz@nutanix.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).