lkml.org 
[lkml]   [2015]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 06/30] PCI: Combine PCI domain and bus number in u32 arg
>> struct pci_scan_info {
>> int bus;
>> struct device *parent;
>> struct pci_ops *ops;
>> void *sysdata;
>> struct list_head *resource;
>> int domain;
>> struct pci_host_bridge_ops;
>> }
>>
>> Do you like this one or keep it like now ?
>>
>> pci_scan_root_bus(struct device *parent, int domain, int bus,
>> struct pci_ops *ops, void *sysdata, struct list_head *resources, struct pci_host_bridge_ops *ops)
>
> I don't think reducing the number of arguments is a good argument for
> squashing some of them together.
>
> I don't really want to add a structure like that because it adds management
> complexity for all the callers because it contains per-bridge things (bus,
> parent, domain, resource, sysdata). Things like struct pci_ops and struct
> pci_host_bridge_ops are much simpler because drivers can statically
> allocate a single copy and use it for multiple devices.
>
> I think it might make sense to put the struct pci_ops pointer inside struct
> pci_host_bridge_ops. That would get rid of one of the arguments.
>
> You might also be able to get rid of the "bus" argument, since the caller
> should be passing an IORESOURCE_BUS resource in the resource list, and
> "bus" should be the same as res->start.

I think this make sense, I will try to find a better solution.

Thanks!
Yijing.

>
> Bjorn
>
> .
>


--
Thanks!
Yijing



\
 
 \ /
  Last update: 2015-03-13 04:41    [W:0.098 / U:2.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site