[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210728175524.GA834270@bjorn-Precision-5520>
Date: Wed, 28 Jul 2021 12:55:24 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Amey Narkhede <ameynarkhede03@...il.com>
Cc: alex.williamson@...hat.com,
Raphael Norwitz <raphael.norwitz@...anix.com>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
kw@...ux.com, Shanker Donthineni <sdonthineni@...dia.com>,
Sinan Kaya <okaya@...nel.org>, Len Brown <lenb@...nel.org>,
"Rafael J . Wysocki" <rjw@...ysocki.net>
Subject: Re: [PATCH v10 8/8] PCI: Change the type of probe argument in reset
functions
On Wed, Jul 28, 2021 at 11:05:14PM +0530, Amey Narkhede wrote:
> On 21/07/27 05:22PM, Bjorn Helgaas wrote:
> > On Fri, Jul 09, 2021 at 06:08:13PM +0530, Amey Narkhede wrote:
> > > Introduce a new enum pci_reset_mode_t to make the context of probe argument
> > > in reset functions clear and the code easier to read. Change the type of
> > > probe argument in functions which implement reset methods from int to
> > > pci_reset_mode_t to make the intent clear.
> >
> > Not sure adding an enum and a PCI_RESET_MODE_MAX seems worth it to me.
> > It's really a boolean parameter, and I'd be happy to change it to a
> > bool. But I don't think it's worth checking against
> > PCI_RESET_MODE_MAX unless we need more than two options.
> >
> Is it okay to use PCI_RESET_PROBE and PCI_RESET_DO_RESET as bool.
> That would be less confusing than directly using true/false.
You mean like this?
#define PCI_RESET_DO_RESET false
#define PCI_RESET_PROBE true
I don't think there's a huge amount of value, but I guess that's OK as
long as it's confined to drivers/pci/, i.e., not exposed via
include/linux/pci.h.
Powered by blists - more mailing lists