lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 13 Mar 2015 11:19:12 +0800
From:	Yijing Wang <wangyijing@...wei.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
CC:	Jiang Liu <jiang.liu@...ux.intel.com>, <linux-pci@...r.kernel.org>,
	Yinghai Lu <yinghai@...nel.org>,
	<linux-kernel@...r.kernel.org>,
	Marc Zyngier <marc.zyngier@....com>,
	<linux-arm-kernel@...ts.infradead.org>,
	Russell King <linux@....linux.org.uk>, <x86@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Tony Luck <tony.luck@...el.com>, <linux-ia64@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	"Guan Xuetao" <gxt@...c.pku.edu.cn>, <linux-alpha@...r.kernel.org>,
	<linux-m68k@...ts.linux-m68k.org>, Liviu Dudau <liviu@...au.co.uk>,
	"Arnd Bergmann" <arnd@...db.de>,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ