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: <54BCE2DA.1000405@huawei.com>
Date:	Mon, 19 Jan 2015 18:56:26 +0800
From:	Yijing Wang <wangyijing@...wei.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	<linux-arm-kernel@...ts.infradead.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Liviu Dudau <liviu@...au.co.uk>,
	Tony Luck <tony.luck@...el.com>,
	Russell King <linux@....linux.org.uk>,
	Marc Zyngier <marc.zyngier@....com>,
	<linux-pci@...r.kernel.org>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	<linux-m68k@...ts.linux-m68k.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	<linux-alpha@...r.kernel.org>, <linux-ia64@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Guan Xuetao <gxt@...c.pku.edu.cn>,
	Yinghai Lu <yinghai@...nel.org>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@....com>
Subject: Re: [PATCH 08/28] PCI: Introduce pci_host_assign_domain_nr() to assign
 domain

On 2015/1/19 17:50, Arnd Bergmann wrote:
> On Monday 19 January 2015 10:14:44 Yijing Wang wrote:
>>>> I'm confused: the same code is already part of the PCI tree, but with
>>>> Lorenzo Pieralisi listed as the patch author. The code is good,
>>>> and I acked it in the past, but one of you is (probably by accident)
>>>> misattributing the patch.
>>>>
>>>> Assuming that the patch that is already merged in next is the right
>>>> one, I think you should rebase your series on top of
>>>>
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git#next
>>>>
>>>> to avoid conflicts like this one.
>>>>
>>>
>>> I think I just got confused because the code duplicates most of
>>> pci_bus_assign_domain_nr(). Maybe this can be done in a better way
>>> by splitting the existing function into 
>>>
>>> static int pci_assign_domain_nr(struct device *)
>>> {
>>>       ... /* most of pci_bus_assign_domain_nr */
>>>
>>>       return domain;
>>> }
>>>
>>> void pci_host_assign_domain_nr(struct pci_host_bridge *host)
>>> {
>>>       host->domain = pci_assign_domain_nr(host->dev.parent);
>>> }
>>>
>>> void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent)
>>> {
>>>       bus->domain_nr = pci_assign_domain_nr(parent);
>>> }
>>>
>>
>> Hi Arnd,
>>    I kept the almost duplicated pci_host_assign_domain_nr() and
>> pci_bus_assign_domain_nr() here for building happy, because now
>> platform specific pci_domain_nr() still exists which may get domain
>> number from pci_bus. pci_bus_assign_domain_nr() will be removed in
>> the last patch.
>>
> 
> I'm not sure I get your point: the approach I showed above seems to have
> the same effect, except it doesn't duplicate code temporarily, which
> makes it less error-prone in case your patch gets merged at the
> same time as another patch that modifies pci_bus_assign_domain_nr.

OK, I got it, will update it, thanks!


Thanks!
Yijing.

> 
> 	Arnd
> 
> .
> 


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