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]
Message-ID: <55019827.2060803@huawei.com>
Date:	Thu, 12 Mar 2015 21:44:07 +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 09/30] PCI: Separate pci_host_bridge creation out of
 pci_create_root_bus()

>> +	host = kzalloc(sizeof(*host), GFP_KERNEL);
>> +	if (!host)
>> +		return NULL;
>> +
>> +	host->busnum = bus;
>> +	host->domain = domain;
>> +	/* If support CONFIG_PCI_DOMAINS_GENERIC, use
>> +	 * pci_host_assign_domain_nr() to assign domain
>> +	 * number instead PCI_DOMAIN(db).
>> +	 */
> 
> Follow the normal Linux comment style:
> 
> 	host->domain = domain;
> 
> 	/*
> 	 * If we support ...
> 	 */

OK.

> 
>> +	pci_host_assign_domain_nr(host);
>> +
...
>>  
>> +struct pci_host_bridge *pci_create_host_bridge(
>> +		struct device *parent, u32 dombus, struct list_head *resources);
>> +void pci_free_host_bridge(struct pci_host_bridge *host);
> 
> A later patch adds another declaration and a blank line here.  If you want
> the blank line, add it here, when you're adding the first declarations in
> this section.

OK.

> 
>>  #endif /* DRIVERS_PCI_H */
>> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
>> index 3d6befd..27ec612 100644
>> --- a/drivers/pci/probe.c
>> +++ b/drivers/pci/probe.c
>> @@ -503,31 +503,6 @@ static struct pci_bus *pci_alloc_bus(struct pci_bus *parent)
>>  	return b;
>>  }
...
>>  struct pci_host_bridge {
>>  	u16	domain;
>> +	u16 busnum;
> 
> Why do we need this?  host_bridge->bus->number and
> host_bridge->bus->busn_res.start both already contain the same information,
> and I hate to add a third place.  I know pci_create_host_bridge() doesn't
> have a struct pci_bus at the point where you initialize busnum, but it does
> have the resource list, which contains the bus number range.

Hmm, I will try to remove it, I put it here because when call pci_create_root_bus(),
I could only pass the pci_host_bridge_ops, don't need to provide the bus number,
pci_scan_root_bus() may lack the bus number resource at that time.
But I think fix it is not a hard job, I will rework it, thanks.


> 
>>  	struct device dev;
>>  	struct pci_bus *bus;		/* root bus */
>>  	struct list_head windows;	/* resource_entry */
>> -- 
>> 1.7.1
>>
> 
> .
> 


-- 
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