From: Bjorn Helgaas <helgaas@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Michael Ellerman" <mpe@ellerman.id.au>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Paul Mackerras" <paulus@samba.org>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Cédric Le Goater" <clg@kaod.org>,
"Nick Child" <nick.child@ibm.com>,
linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code
Date: Mon, 11 Jul 2022 17:35:55 -0500 [thread overview]
Message-ID: <20220711223555.GA702011@bhelgaas> (raw)
In-Reply-To: <20220706104308.5390-2-pali@kernel.org>
On Wed, Jul 06, 2022 at 12:43:04PM +0200, Pali Rohár wrote:
> Function pci_device_from_OF_node() is used only in powermac code.
> So hide it from all other platforms as it is unsed.
s/unsed/unused/ (same typo in 3/5 patch)
These are for the powerpc folks, so I'm just kibbitzing here.
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> arch/powerpc/include/asm/pci-bridge.h | 2 ++
> arch/powerpc/kernel/pci_32.c | 2 ++
> arch/powerpc/kernel/pci_64.c | 2 ++
> 3 files changed, 6 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
> index c85f901227c9..98156932a1f5 100644
> --- a/arch/powerpc/include/asm/pci-bridge.h
> +++ b/arch/powerpc/include/asm/pci-bridge.h
> @@ -170,8 +170,10 @@ static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
> return bus->sysdata;
> }
>
> +#ifdef CONFIG_PPC_PMAC
> extern int pci_device_from_OF_node(struct device_node *node,
> u8 *bus, u8 *devfn);
> +#endif
> #ifndef CONFIG_PPC64
>
> extern void pci_create_OF_bus_map(void);
> diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
> index 5a174936c9a0..c3b91fb62a71 100644
> --- a/arch/powerpc/kernel/pci_32.c
> +++ b/arch/powerpc/kernel/pci_32.c
> @@ -154,6 +154,7 @@ pcibios_make_OF_bus_map(void)
> }
>
>
> +#ifdef CONFIG_PPC_PMAC
> /*
> * Returns the PCI device matching a given OF node
> */
> @@ -193,6 +194,7 @@ int pci_device_from_OF_node(struct device_node *node, u8 *bus, u8 *devfn)
> return -ENODEV;
> }
> EXPORT_SYMBOL(pci_device_from_OF_node);
> +#endif
>
> /* We create the "pci-OF-bus-map" property now so it appears in the
> * /proc device tree
> diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> index 19b03ddf5631..0c7cfb9fab04 100644
> --- a/arch/powerpc/kernel/pci_64.c
> +++ b/arch/powerpc/kernel/pci_64.c
> @@ -286,6 +286,7 @@ int pcibus_to_node(struct pci_bus *bus)
> EXPORT_SYMBOL(pcibus_to_node);
> #endif
>
> +#ifdef CONFIG_PPC_PMAC
> int pci_device_from_OF_node(struct device_node *np, u8 *bus, u8 *devfn)
> {
> if (!PCI_DN(np))
> @@ -294,3 +295,4 @@ int pci_device_from_OF_node(struct device_node *np, u8 *bus, u8 *devfn)
> *devfn = PCI_DN(np)->devfn;
> return 0;
> }
> +#endif
> --
> 2.20.1
>
next prev parent reply other threads:[~2022-07-11 22:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 10:43 [PATCH 0/5] powerpc/pci: Cleanup unused code and enable 256 PCI buses Pali Rohár
2022-07-06 10:43 ` [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code Pali Rohár
2022-07-11 22:35 ` Bjorn Helgaas [this message]
2022-07-06 10:43 ` [PATCH 2/5] powerpc/pci: Make pcibios_make_OF_bus_map() static Pali Rohár
2022-07-06 10:43 ` [PATCH 3/5] powerpc/pci: Hide pci_create_OF_bus_map() for non-chrp code Pali Rohár
2022-07-06 10:43 ` [PATCH 4/5] powerpc/pci: Disable filling pci-OF-bus-map for non-chrp/powermac Pali Rohár
2022-07-06 10:43 ` [PATCH 5/5] powerpc/pci: Add config option for using all 256 PCI buses Pali Rohár
2022-07-21 22:21 ` Pali Rohár
2022-07-26 11:02 ` Michael Ellerman
2022-07-26 11:10 ` Pali Rohár
2022-08-17 16:42 ` Pali Rohár
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=20220711223555.GA702011@bhelgaas \
--to=helgaas@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@csgroup.eu \
--cc=clg@kaod.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nick.child@ibm.com \
--cc=pali@kernel.org \
--cc=paulus@samba.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).