Re: [PATCH v4 03/10] PCI: Introduce pci_walk_bus_reverse(), for_each_pci_dev_reverse()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > +enum pci_search_direction {
> > > +	PCI_SEARCH_FORWARD,
> > > +	PCI_SEARCH_REVERSE,
> > > +};
> > > +  
> > 
> > I don't really care, but given there are only two sane directions maybe
> > a bool reverse as a parameter to __pci_get_subsys() would be sufficient?   
> 
> I dislike reading:
> 
>    return __pci_get_subsys(vendor, device, ss_vendor, ss_device, from, false);
> 
> ...in isolation where I must walk the symbol to the function to figure
> out what that parameter means vs:
> 
>    return __pci_get_subsys(vendor, device, ss_vendor, ss_device, from,
>                            PCI_SEARCH_FORWARD);
> 
> ...which is immediately clear.
Fair enough.

> 
> >   




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux