public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail•com>
To: linux-mips@vger•kernel.org
Cc: gregkh@linuxfoundation•org, linux-kernel@vger•kernel.org,
	linux-next@vger•kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha•franken.de>,
	Stephen Rothwell <sfr@canb•auug.org.au>
Subject: [PATCH] MIPS: asm: pci: define arch-specific 'pci_remap_iospace()' dependent on 'CONFIG_PCI_DRIVERS_GENERIC'
Date: Fri,  8 Oct 2021 11:53:11 +0200	[thread overview]
Message-ID: <20211008095311.26475-1-sergio.paracuellos@gmail.com> (raw)

Some MIPS defconfigs that don't define 'CONFIG_PCI_DRIVERS_GENERIC' but
define 'CONFIG_PCI_DRIVERS_LEGACY' or none of them, can fail when they are
built since definition for 'pci_remap_iospace' is being done in include
file 'arch/mips/include/asm/pci.h' and the specific function implemented
in 'arch/mips/pci/pci-generic.c'. MIPS PCI drivers that don't use generic
PCI core APIs don't really need 'pci_remap_iospace' to be defined at all.
Hence, change definition for 'pci_remap_iospace' to be dependent on the
preprocessor 'CONFIG_PCI_DRIVERS_GENERIC' definition to avoid possible
build problems.

CC: Thomas Bogendoerfer <tsbogend@alpha•franken.de>
Fixes: 9f76779f2418 ("MIPS: implement architecture-specific 'pci_remap_iospace()'")
Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail•com>
---
Hi Greg, Thomas, Stephen,

I guess this should also go through the staging-tree.

Thanks in advance for your time.

Best regards,
    Sergio Paracuellos

 arch/mips/include/asm/pci.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h
index 35270984a5f0..421231f55935 100644
--- a/arch/mips/include/asm/pci.h
+++ b/arch/mips/include/asm/pci.h
@@ -20,7 +20,9 @@
 #include <linux/list.h>
 #include <linux/of.h>
 
+#ifdef CONFIG_PCI_DRIVERS_GENERIC
 #define pci_remap_iospace pci_remap_iospace
+#endif
 
 #ifdef CONFIG_PCI_DRIVERS_LEGACY
 
-- 
2.33.0


             reply	other threads:[~2021-10-08  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  9:53 Sergio Paracuellos [this message]
2021-10-09  8:37 ` [PATCH] MIPS: asm: pci: define arch-specific 'pci_remap_iospace()' dependent on 'CONFIG_PCI_DRIVERS_GENERIC' Greg KH
2021-10-09  9:28   ` Sergio Paracuellos

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=20211008095311.26475-1-sergio.paracuellos@gmail.com \
    --to=sergio.paracuellos@gmail$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=tsbogend@alpha$(echo .)franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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