Re: [PATCH v6 06/30] PCI: Combine PCI domain and bus number in u32 arg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
- Subject: Re: [PATCH v6 06/30] PCI: Combine PCI domain and bus number in u32 arg
- From: Yijing Wang <wangyijing@xxxxxxxxxx>
- Date: Fri, 13 Mar 2015 11:19:12 +0800
- Cc: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, Yinghai Lu <yinghai@xxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, Marc Zyngier <marc.zyngier@xxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, <linux-ia64@xxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, "Guan Xuetao" <gxt@xxxxxxxxxxxxxxx>, <linux-alpha@xxxxxxxxxxxxxxx>, <linux-m68k@xxxxxxxxxxxxxxx>, Liviu Dudau <liviu@xxxxxxxxxxx>, "Arnd Bergmann" <arnd@xxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
- In-reply-to: <20150312194927.GC7346@google.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1425868467-9667-1-git-send-email-wangyijing@huawei.com> <1425868467-9667-7-git-send-email-wangyijing@huawei.com> <20150312012946.GA10949@google.com> <55018330.5050002@huawei.com> <20150312194927.GC7346@google.com>
- User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]