Message ID | 20200730005614.32302-1-jiaxun.yang@flygoat.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 0fc0ead3488836503573286bcaa56f9743ea2bcc |
Headers | show |
Series | of_address: Guard of_bus_pci_get_flags with CONFIG_PCI | expand |
On Wed, Jul 29, 2020 at 7:04 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote: > > After 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser"), > the last user of of_bus_pci_get_flags when CONFIG_PCI is disabled had gone. > > This caused unused function warning when compiling without CONFIG_PCI. > Fix by guarding it with CONFIG_PCI. > > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") > --- > drivers/of/address.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Rob Herring <robh@kernel.org>
On Fri, Jul 31, 2020 at 08:27:55AM -0600, Rob Herring wrote: > On Wed, Jul 29, 2020 at 7:04 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote: > > > > After 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser"), > > the last user of of_bus_pci_get_flags when CONFIG_PCI is disabled had gone. > > > > This caused unused function warning when compiling without CONFIG_PCI. > > Fix by guarding it with CONFIG_PCI. > > > > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > > Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") > > --- > > drivers/of/address.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Acked-by: Rob Herring <robh@kernel.org> applied to mips-next. Thomas.
diff --git a/drivers/of/address.c b/drivers/of/address.c index 813936d419ad..157dc7e06077 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -101,6 +101,7 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr) return IORESOURCE_MEM; } +#ifdef CONFIG_PCI static unsigned int of_bus_pci_get_flags(const __be32 *addr) { unsigned int flags = 0; @@ -123,7 +124,6 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr) return flags; } -#ifdef CONFIG_PCI /* * PCI bus specific translator */
After 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser"), the last user of of_bus_pci_get_flags when CONFIG_PCI is disabled had gone. This caused unused function warning when compiling without CONFIG_PCI. Fix by guarding it with CONFIG_PCI. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") --- drivers/of/address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)