lkml.org 
[lkml]   [2021]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2021-07-28 19:56    [W:0.042 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site