Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] of_address: Guard of_bus_pci_get_flags with CONFIG_PCI
@ 2020-07-30  0:56 Jiaxun Yang
  2020-07-31 14:27 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Jiaxun Yang @ 2020-07-30  0:56 UTC (permalink / raw)
  To: linux-mips; +Cc: robh, linux-kernel, tsbogend, Jiaxun Yang, Stephen Rothwell

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(-)

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
  */
-- 
2.27.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] of_address: Guard of_bus_pci_get_flags with CONFIG_PCI
  2020-07-30  0:56 [PATCH] of_address: Guard of_bus_pci_get_flags with CONFIG_PCI Jiaxun Yang
@ 2020-07-31 14:27 ` Rob Herring
  2020-07-31 15:45   ` Thomas Bogendoerfer
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2020-07-31 14:27 UTC (permalink / raw)
  To: Jiaxun Yang
  Cc: open list:MIPS, linux-kernel, Thomas Bogendoerfer, Stephen Rothwell

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] of_address: Guard of_bus_pci_get_flags with CONFIG_PCI
  2020-07-31 14:27 ` Rob Herring
@ 2020-07-31 15:45   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2020-07-31 15:45 UTC (permalink / raw)
  To: Rob Herring; +Cc: Jiaxun Yang, open list:MIPS, linux-kernel, Stephen Rothwell

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.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  0:56 [PATCH] of_address: Guard of_bus_pci_get_flags with CONFIG_PCI Jiaxun Yang
2020-07-31 14:27 ` Rob Herring
2020-07-31 15:45   ` Thomas Bogendoerfer

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git