All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Branden <scott.branden@broadcom.com>
To: Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: linux-pci@vger.kernel.org, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Jon Mason <jonmason@broadcom.com>
Subject: Re: [PATCH 2/9] PCI: iproc: remove dependency on ARM specific struct pci_sys_data
Date: Wed, 7 Mar 2018 09:58:13 -0800	[thread overview]
Message-ID: <e46bd6df-ca7c-91df-39e0-bb4de5ea161f@broadcom.com> (raw)
In-Reply-To: <20180307154243.3205-3-robh@kernel.org>

Looks fine.


On 18-03-07 07:42 AM, Rob Herring wrote:
> The iproc driver is using ARM's struct pci_sys_data simply to store a
> private data pointer. This is completely unnecessary, so store the
> private data directly in bus->sysdata as is done on arm64.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Scott Branden <scott.branden@broadcom.com>
> ---
>   drivers/pci/host/pcie-iproc-bcma.c |  3 +--
>   drivers/pci/host/pcie-iproc.c      | 19 ++-----------------
>   drivers/pci/host/pcie-iproc.h      |  4 ----
>   3 files changed, 3 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-iproc-bcma.c b/drivers/pci/host/pcie-iproc-bcma.c
> index 603c83429cb3..aa55b064f64d 100644
> --- a/drivers/pci/host/pcie-iproc-bcma.c
> +++ b/drivers/pci/host/pcie-iproc-bcma.c
> @@ -25,8 +25,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x8012, bcma_pcie2_fixup_class);
>   
>   static int iproc_pcie_bcma_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>   {
> -	struct pci_sys_data *sys = dev->sysdata;
> -	struct iproc_pcie *pcie = sys->private_data;
> +	struct iproc_pcie *pcie = dev->sysdata;
>   	struct bcma_device *bdev = container_of(pcie->dev, struct bcma_device, dev);
>   
>   	return bcma_core_irq(bdev, 5);
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index cbb095481cdc..3c76c5fa4f32 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -377,14 +377,7 @@ static const u16 iproc_pcie_reg_paxc_v2[] = {
>   
>   static inline struct iproc_pcie *iproc_data(struct pci_bus *bus)
>   {
> -	struct iproc_pcie *pcie;
> -#ifdef CONFIG_ARM
> -	struct pci_sys_data *sys = bus->sysdata;
> -
> -	pcie = sys->private_data;
> -#else
> -	pcie = bus->sysdata;
> -#endif
> +	struct iproc_pcie *pcie = bus->sysdata;
>   	return pcie;
>   }
>   
> @@ -1331,7 +1324,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
>   {
>   	struct device *dev;
>   	int ret;
> -	void *sysdata;
>   	struct pci_bus *child;
>   	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
>   
> @@ -1376,13 +1368,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
>   			goto err_power_off_phy;
>   	}
>   
> -#ifdef CONFIG_ARM
> -	pcie->sysdata.private_data = pcie;
> -	sysdata = &pcie->sysdata;
> -#else
> -	sysdata = pcie;
> -#endif
> -
>   	ret = iproc_pcie_check_link(pcie);
>   	if (ret) {
>   		dev_err(dev, "no PCIe EP device detected\n");
> @@ -1399,7 +1384,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
>   	host->busnr = 0;
>   	host->dev.parent = dev;
>   	host->ops = &iproc_pcie_ops;
> -	host->sysdata = sysdata;
> +	host->sysdata = pcie;
>   	host->map_irq = pcie->map_irq;
>   	host->swizzle_irq = pci_common_swizzle;
>   
> diff --git a/drivers/pci/host/pcie-iproc.h b/drivers/pci/host/pcie-iproc.h
> index d55f56a186cd..814b600b383a 100644
> --- a/drivers/pci/host/pcie-iproc.h
> +++ b/drivers/pci/host/pcie-iproc.h
> @@ -54,7 +54,6 @@ struct iproc_msi;
>    * @reg_offsets: register offsets
>    * @base: PCIe host controller I/O register base
>    * @base_addr: PCIe host controller register base physical address
> - * @sysdata: Per PCI controller data (ARM-specific)
>    * @root_bus: pointer to root bus
>    * @phy: optional PHY device that controls the Serdes
>    * @map_irq: function callback to map interrupts
> @@ -80,9 +79,6 @@ struct iproc_pcie {
>   	u16 *reg_offsets;
>   	void __iomem *base;
>   	phys_addr_t base_addr;
> -#ifdef CONFIG_ARM
> -	struct pci_sys_data sysdata;
> -#endif
>   	struct resource mem;
>   	struct pci_bus *root_bus;
>   	struct phy *phy;

  reply	other threads:[~2018-03-07 17:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 15:42 [PATCH 0/9] PCI DT header refactoring and compile test improvements Rob Herring
2018-03-07 15:42 ` [PATCH 1/9] PCI: kirin: remove unnecessary asm/compiler.h include Rob Herring
2018-03-07 15:42 ` [PATCH 2/9] PCI: iproc: remove dependency on ARM specific struct pci_sys_data Rob Herring
2018-03-07 17:58   ` Scott Branden [this message]
2018-03-07 15:42 ` [PATCH 3/9] PCI: kirin: fix missing dependency on PCI_MSI_IRQ_DOMAIN Rob Herring
2018-03-07 15:42 ` [PATCH 4/9] PCI: kirin_pcie_driver can be static Rob Herring
2018-03-08 17:51   ` Lorenzo Pieralisi
2018-03-07 15:42 ` [PATCH 5/9] PCI: rcar: fix semicolon.cocci warnings Rob Herring
2018-03-07 15:42 ` [PATCH 6/9] PCI: v3-semi: " Rob Herring
2018-03-07 15:42 ` [PATCH 7/9] PCI: improve host drivers compile test coverage Rob Herring
2018-03-07 17:57   ` Scott Branden
2018-03-16 19:53     ` Rob Herring
2018-03-19 18:05       ` Lorenzo Pieralisi
2018-03-19 18:11         ` Scott Branden
2018-03-07 15:42 ` [PATCH 8/9] PCI: dw: move CONFIG_PCI depends to menu Rob Herring
2018-03-07 15:42 ` [PATCH 9/9] PCI: move private DT related functions into private header Rob Herring
2018-03-20 18:18 ` [PATCH 0/9] PCI DT header refactoring and compile test improvements Lorenzo Pieralisi
2018-03-20 18:34   ` Scott Branden

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=e46bd6df-ca7c-91df-39e0-bb4de5ea161f@broadcom.com \
    --to=scott.branden@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=jonmason@broadcom.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjui@broadcom.com \
    --cc=robh@kernel.org \
    --cc=sbranden@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.