From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: Re: [PATCH 08/28] PCI: Introduce pci_host_assign_domain_nr() to assign domain Date: Mon, 19 Jan 2015 10:14:44 +0800 Message-ID: <54BC6894.6060500@huawei.com> References: <1421372666-12288-1-git-send-email-wangyijing@huawei.com> <1421372666-12288-9-git-send-email-wangyijing@huawei.com> <13182982.DnZJMY2KHL@wuerfel> <3026954.09KG7UaUTi@wuerfel> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <3026954.09KG7UaUTi@wuerfel> Sender: linux-alpha-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org Cc: Bjorn Helgaas , Liviu Dudau , Tony Luck , Russell King , Marc Zyngier , linux-pci@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven , linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, Thomas Gleixner , Guan Xuetao , Yinghai Lu , Jiang Liu , Lorenzo Pieralisi >> 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. Thanks! Yijing. > . > -- Thanks! Yijing