From: Niklas Schnelle <schnelle@linux.ibm.com> To: "Oliver O'Halloran" <oohall@gmail.com>, Michal Simek <monstr@monstr.eu>, Michael Ellerman <mpe@ellerman.id.au>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Christian Borntraeger <borntraeger@de.ibm.com>, "David S. Miller" <davem@davemloft.net>, Bjorn Helgaas <bhelgaas@google.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com> Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] pci: Rename pcibios_add_device to match Date: Wed, 15 Sep 2021 12:13:56 +0200 [thread overview] Message-ID: <3cfa5c39151b415000b13f94edbd513940c272c4.camel@linux.ibm.com> (raw) In-Reply-To: <20210913152709.48013-1-oohall@gmail.com> On Tue, 2021-09-14 at 01:27 +1000, Oliver O'Halloran wrote: > The general convention for pcibios_* hooks is that they're named after > the corresponding pci_* function they provide a hook for. The exception > is pcibios_add_device() which provides a hook for pci_device_add(). This > has been irritating me for years so rename it. > > Also, remove the export of the microblaze version. The only caller > must be compiled as a built-in so there's no reason for the export. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > arch/microblaze/pci/pci-common.c | 3 +-- > arch/powerpc/kernel/pci-common.c | 2 +- > arch/powerpc/platforms/powernv/pci-sriov.c | 2 +- > arch/s390/pci/pci.c | 2 +- > arch/sparc/kernel/pci.c | 2 +- > arch/x86/pci/common.c | 2 +- > drivers/pci/pci.c | 4 ++-- > drivers/pci/probe.c | 4 ++-- > include/linux/pci.h | 2 +- > 9 files changed, 11 insertions(+), 12 deletions(-) > > .. snip .. > diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c > index e7e6788d75a8..ded3321b7208 100644 > --- a/arch/s390/pci/pci.c > +++ b/arch/s390/pci/pci.c > @@ -561,7 +561,7 @@ static void zpci_cleanup_bus_resources(struct zpci_dev *zdev) > zdev->has_resources = 0; > } > > -int pcibios_add_device(struct pci_dev *pdev) > +int pcibios_device_add(struct pci_dev *pdev) > { > struct zpci_dev *zdev = to_zpci(pdev); > struct resource *res; > .. snip .. > I agree with your assesment this is indeed confusing. Interestingly pcibios_release_device() also doesn't follow the convention exactly as it is called from pci_release_dev() but at least that isn't very confusing. So for the arch/s390/pci bit: Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
WARNING: multiple messages have this Message-ID (diff)
From: Niklas Schnelle <schnelle@linux.ibm.com> To: "Oliver O'Halloran" <oohall@gmail.com>, Michal Simek <monstr@monstr.eu>, Michael Ellerman <mpe@ellerman.id.au>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Christian Borntraeger <borntraeger@de.ibm.com>, "David S. Miller" <davem@davemloft.net>, Bjorn Helgaas <bhelgaas@google.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com> Cc: sparclinux@vger.kernel.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] pci: Rename pcibios_add_device to match Date: Wed, 15 Sep 2021 12:13:56 +0200 [thread overview] Message-ID: <3cfa5c39151b415000b13f94edbd513940c272c4.camel@linux.ibm.com> (raw) In-Reply-To: <20210913152709.48013-1-oohall@gmail.com> On Tue, 2021-09-14 at 01:27 +1000, Oliver O'Halloran wrote: > The general convention for pcibios_* hooks is that they're named after > the corresponding pci_* function they provide a hook for. The exception > is pcibios_add_device() which provides a hook for pci_device_add(). This > has been irritating me for years so rename it. > > Also, remove the export of the microblaze version. The only caller > must be compiled as a built-in so there's no reason for the export. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > arch/microblaze/pci/pci-common.c | 3 +-- > arch/powerpc/kernel/pci-common.c | 2 +- > arch/powerpc/platforms/powernv/pci-sriov.c | 2 +- > arch/s390/pci/pci.c | 2 +- > arch/sparc/kernel/pci.c | 2 +- > arch/x86/pci/common.c | 2 +- > drivers/pci/pci.c | 4 ++-- > drivers/pci/probe.c | 4 ++-- > include/linux/pci.h | 2 +- > 9 files changed, 11 insertions(+), 12 deletions(-) > > .. snip .. > diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c > index e7e6788d75a8..ded3321b7208 100644 > --- a/arch/s390/pci/pci.c > +++ b/arch/s390/pci/pci.c > @@ -561,7 +561,7 @@ static void zpci_cleanup_bus_resources(struct zpci_dev *zdev) > zdev->has_resources = 0; > } > > -int pcibios_add_device(struct pci_dev *pdev) > +int pcibios_device_add(struct pci_dev *pdev) > { > struct zpci_dev *zdev = to_zpci(pdev); > struct resource *res; > .. snip .. > I agree with your assesment this is indeed confusing. Interestingly pcibios_release_device() also doesn't follow the convention exactly as it is called from pci_release_dev() but at least that isn't very confusing. So for the arch/s390/pci bit: Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
next prev parent reply other threads:[~2021-09-15 10:15 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-13 15:27 [PATCH] pci: Rename pcibios_add_device to match Oliver O'Halloran 2021-09-13 15:27 ` Oliver O'Halloran 2021-09-14 19:40 ` Bjorn Helgaas 2021-09-14 19:40 ` Bjorn Helgaas 2021-09-15 10:13 ` Niklas Schnelle [this message] 2021-09-15 10:13 ` Niklas Schnelle
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3cfa5c39151b415000b13f94edbd513940c272c4.camel@linux.ibm.com \ --to=schnelle@linux.ibm.com \ --cc=benh@kernel.crashing.org \ --cc=bhelgaas@google.com \ --cc=borntraeger@de.ibm.com \ --cc=bp@alien8.de \ --cc=davem@davemloft.net \ --cc=gerald.schaefer@linux.ibm.com \ --cc=gor@linux.ibm.com \ --cc=hca@linux.ibm.com \ --cc=hpa@zytor.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=linux-s390@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mingo@redhat.com \ --cc=monstr@monstr.eu \ --cc=mpe@ellerman.id.au \ --cc=oohall@gmail.com \ --cc=paulus@samba.org \ --cc=sparclinux@vger.kernel.org \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.