Re: [PATCH 10/28] PCI: Save sysdata in pci_host_bridge drvdata
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [PATCH 10/28] PCI: Save sysdata in pci_host_bridge drvdata
- From: Arnd Bergmann <arnd@xxxxxxxx>
- Date: Fri, 16 Jan 2015 10:18:59 +0100
- Cc: Yijing Wang <wangyijing@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Liviu Dudau <liviu@xxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, Marc Zyngier <marc.zyngier@xxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, linux-m68k@xxxxxxxxxxxxxxx, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, Yinghai Lu <yinghai@xxxxxxxxxx>, Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
- In-reply-to: <1421372666-12288-11-git-send-email-wangyijing@huawei.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1421372666-12288-1-git-send-email-wangyijing@huawei.com> <1421372666-12288-11-git-send-email-wangyijing@huawei.com>
- User-agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; )
On Friday 16 January 2015 09:44:08 Yijing Wang wrote:
> @@ -2066,11 +2064,11 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, u32 db,
> {
> struct pci_host_bridge *host;
>
> - host = pci_create_host_bridge(parent, db, resources);
> + host = pci_create_host_bridge(parent, db, resources, sysdata);
> if (!host)
> return NULL;
>
> - return __pci_scan_root_bus(host, ops, sysdata);
> + return __pci_scan_root_bus(host, ops);
> }
> EXPORT_SYMBOL(pci_scan_root_bus);
>
How about keeping the sysdata out of the pci_create_host_bridge interface, and
refactoring it so that the call sequence becomes
host = pci_create_host_bridge(parent, db, resources);
host->sysdata = sysdata;
__pci_scan_root_bus(host, ops);
This way, we can make sysdata completely option. I assume that more of the
fields we have in sysdata today can get moved into pci_host_bridge
over time, so a host bridge driver can just assign those members individually
between pci_create_host_bridge and __pci_scan_root_bus.
Arnd
--
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]