Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Fan Fei <ffclaire1224@gmail.com>
To: bjorn@helgaas.com
Cc: Fan Fei <ffclaire1224@gmail.com>, linux-pci@vger.kernel.org
Subject: [PATCH 3/4] PCI: al: Remove device * in struct
Date: Tue, 23 Nov 2021 16:38:37 +0100	[thread overview]
Message-ID: <e1c097ef8ef4e42b2fd94a327ce5af2bc2bac991.1637533108.git.ffclaire1224@gmail.com> (raw)
In-Reply-To: <cover.1637533108.git.ffclaire1224@gmail.com>

Remove "device *dev" in struct al_pcie because it refers struct dw_pcie,
which contains a "device *dev" already.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pcie-al.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-al.c b/drivers/pci/controller/dwc/pcie-al.c
index e8afa50129a8..f4b7bcda6b2d 100644
--- a/drivers/pci/controller/dwc/pcie-al.c
+++ b/drivers/pci/controller/dwc/pcie-al.c
@@ -130,7 +130,6 @@ struct al_pcie_target_bus_cfg {
 struct al_pcie {
 	struct dw_pcie *pci;
 	void __iomem *controller_base; /* base of PCIe unit (not DW core) */
-	struct device *dev;
 	resource_size_t ecam_size;
 	unsigned int controller_rev_id;
 	struct al_pcie_reg_offsets reg_offsets;
@@ -171,12 +170,12 @@ static int al_pcie_rev_id_get(struct al_pcie *pcie, unsigned int *rev_id)
 		*rev_id = AL_PCIE_REV_ID_4;
 		break;
 	default:
-		dev_err(pcie->dev, "Unsupported dev_id_val (0x%x)\n",
+		dev_err(pcie->pci->dev, "Unsupported dev_id_val (0x%x)\n",
 			dev_id_val);
 		return -EINVAL;
 	}
 
-	dev_dbg(pcie->dev, "dev_id_val: 0x%x\n", dev_id_val);
+	dev_dbg(pcie->pci->dev, "dev_id_val: 0x%x\n", dev_id_val);
 
 	return 0;
 }
@@ -192,7 +191,7 @@ static int al_pcie_reg_offsets_set(struct al_pcie *pcie)
 		pcie->reg_offsets.ob_ctrl = OB_CTRL_REV3_5_OFFSET;
 		break;
 	default:
-		dev_err(pcie->dev, "Unsupported controller rev_id: 0x%x\n",
+		dev_err(pcie->pci->dev, "Unsupported controller rev_id: 0x%x\n",
 			pcie->controller_rev_id);
 		return -EINVAL;
 	}
@@ -258,7 +257,7 @@ static void al_pcie_config_prepare(struct al_pcie *pcie)
 
 	ecam_bus_mask = (pcie->ecam_size >> PCIE_ECAM_BUS_SHIFT) - 1;
 	if (ecam_bus_mask > 255) {
-		dev_warn(pcie->dev, "ECAM window size is larger than 256MB. Cutting off at 256\n");
+		dev_warn(pcie->pci->dev, "ECAM window size is larger than 256MB. Cutting off at 256\n");
 		ecam_bus_mask = 255;
 	}
 
@@ -334,7 +333,6 @@ static int al_pcie_probe(struct platform_device *pdev)
 	pci->pp.ops = &al_pcie_host_ops;
 
 	al_pcie->pci = pci;
-	al_pcie->dev = dev;
 
 	ecam_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "config");
 	if (!ecam_res) {
-- 
2.25.1


  parent reply	other threads:[~2021-11-23 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 15:38 [PATCH 0/4] Remove device * in struct Fan Fei
2021-11-23 15:38 ` [PATCH 1/4] PCI: j721e: Remove cast of void* type Fan Fei
2021-11-23 15:38 ` [PATCH 2/4] PCI: tegra194: Remove device * in struct Fan Fei
2021-11-23 15:38 ` Fan Fei [this message]
2021-11-23 15:38 ` [PATCH 4/4] PCI: j721e: " Fan Fei
2021-11-23 16:05 ` [PATCH 0/4] " Bjorn Helgaas
2021-11-27 14:17   ` Fan Fei

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=e1c097ef8ef4e42b2fd94a327ce5af2bc2bac991.1637533108.git.ffclaire1224@gmail.com \
    --to=ffclaire1224@gmail.com \
    --cc=bjorn@helgaas.com \
    --cc=linux-pci@vger.kernel.org \
    /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