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: <20220711223555.GA702011@bhelgaas>
Date:   Mon, 11 Jul 2022 17:35:55 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Pali Rohár <pali@...nel.org>
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Cédric Le Goater <clg@...d.org>,
        Nick Child <nick.child@....com>, linux-pci@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for
 non-powermac code

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@...nel.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ