linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-pci@vger.kernel.org, "Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCH 01/10] ARM: orion5x: Rename PCI_CONF_{REG,FUNC}() out of the way
Date: Sun, 05 May 2024 18:38:14 +0200	[thread overview]
Message-ID: <87seywnrih.fsf@BLaptop.bootlin.com> (raw)
In-Reply-To: <20240429104633.11060-2-ilpo.jarvinen@linux.intel.com>

Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:

> orion5x defines PCI_CONF_REG() and PCI_CONF_FUNC() that are problematic
> because PCI core is going to introduce defines with the same names.
>
> Add ORION5X prefix to those defines to avoid name conflicts.
>
> Note: as this is part of series that replaces the code in question
> anyway, only bare minimum renaming is done and other similarly named
> macros are not touched.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>

As some other patches of the series depend on patches in the PCIe
subsystem, the best approach would be to let you apply the series
through the PCIe subsystem.

Thanks,

Gregory
> ---
>  arch/arm/mach-orion5x/pci.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
> index 3313bc5a63ea..77ddab90f448 100644
> --- a/arch/arm/mach-orion5x/pci.c
> +++ b/arch/arm/mach-orion5x/pci.c
> @@ -219,8 +219,8 @@ static int __init pcie_setup(struct pci_sys_data *sys)
>  /*
>   * PCI_CONF_ADDR bits
>   */
> -#define PCI_CONF_REG(reg)		((reg) & 0xfc)
> -#define PCI_CONF_FUNC(func)		(((func) & 0x3) << 8)
> +#define ORION5X_PCI_CONF_REG(reg)	((reg) & 0xfc)
> +#define ORION5X_PCI_CONF_FUNC(func)	(((func) & 0x3) << 8)
>  #define PCI_CONF_DEV(dev)		(((dev) & 0x1f) << 11)
>  #define PCI_CONF_BUS(bus)		(((bus) & 0xff) << 16)
>  #define PCI_CONF_ADDR_EN		(1 << 31)
> @@ -277,8 +277,8 @@ static int orion5x_pci_hw_rd_conf(int bus, int dev, u32 func,
>  	spin_lock_irqsave(&orion5x_pci_lock, flags);
>  
>  	writel(PCI_CONF_BUS(bus) |
> -		PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
> -		PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
> +		PCI_CONF_DEV(dev) | ORION5X_PCI_CONF_REG(where) |
> +		ORION5X_PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
>  
>  	*val = readl(PCI_CONF_DATA);
>  
> @@ -301,8 +301,8 @@ static int orion5x_pci_hw_wr_conf(int bus, int dev, u32 func,
>  	spin_lock_irqsave(&orion5x_pci_lock, flags);
>  
>  	writel(PCI_CONF_BUS(bus) |
> -		PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
> -		PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
> +		PCI_CONF_DEV(dev) | ORION5X_PCI_CONF_REG(where) |
> +		ORION5X_PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
>  
>  	if (size == 4) {
>  		__raw_writel(val, PCI_CONF_DATA);
> -- 
> 2.39.2

  parent reply	other threads:[~2024-05-05 16:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 10:46 [PATCH 00/10] PCI: Add generic Conf Type 0/1 helpers Ilpo Järvinen
2024-04-29 10:46 ` [PATCH 01/10] ARM: orion5x: Rename PCI_CONF_{REG,FUNC}() out of the way Ilpo Järvinen
2024-04-29 14:08   ` Andrew Lunn
2024-04-29 14:38   ` Andrew Lunn
2024-04-29 14:51     ` Ilpo Järvinen
2024-05-05 16:38   ` Gregory CLEMENT [this message]
2024-04-29 10:46 ` [PATCH 02/10] PCI: Add helpers to calculate PCI Conf Type 0/1 addresses Ilpo Järvinen
2024-04-29 19:24   ` Pali Rohár
2024-04-30 10:21     ` Ilpo Järvinen
2024-04-30 18:43       ` Pali Rohár
2024-04-29 10:46 ` [PATCH 03/10] ARM: orion5x: Pass devfn to orion5x_pci_hw_{rd,wr}_conf() Ilpo Järvinen
2024-04-29 14:11   ` Andrew Lunn
2024-05-05 16:38   ` Gregory CLEMENT
2024-04-29 10:46 ` [PATCH 04/10] ARM: orion5x: Use generic PCI Conf Type 1 helper Ilpo Järvinen
2024-05-05 16:39   ` Gregory CLEMENT
2024-04-29 10:46 ` [PATCH 05/10] PCI: ixp4xx: Use generic PCI Conf Type 0 helper Ilpo Järvinen
2024-05-03  8:42   ` Linus Walleij
2024-04-29 10:46 ` [PATCH 06/10] PCI: ixp4xx: Replace 1 with PCI_CONF1_TRANSACTION Ilpo Järvinen
2024-05-03  8:43   ` Linus Walleij
2024-04-29 10:46 ` [PATCH 07/10] PCI: Replace PCI_CONF1{,_EXT}_ADDRESS() with the new helpers Ilpo Järvinen
2024-05-03  8:43   ` Linus Walleij
2024-05-03  9:42   ` Sergio Paracuellos
2024-04-29 10:46 ` [PATCH 08/10] PCI: tegra: Use generic PCI Conf Type 1 helper Ilpo Järvinen
2024-04-29 10:46 ` [PATCH 09/10] PCI: mvebu: " Ilpo Järvinen
2024-04-29 19:31   ` Pali Rohár
2024-04-29 19:45   ` Andrew Lunn
2024-04-29 10:46 ` [PATCH 10/10] PCI: v3: Use generic PCI Conf Type 0/1 helpers Ilpo Järvinen
2024-05-03  8:44   ` Linus Walleij
2024-04-29 18:23 ` [PATCH 00/10] PCI: Add generic " Pali Rohár
2024-04-30 11:18   ` Ilpo Järvinen

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=87seywnrih.fsf@BLaptop.bootlin.com \
    --to=gregory.clement@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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).