From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Greentime Hu" <greentime.hu@sifive.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"Rob Herring" <robh@kernel.org>,
"Xiaowei Song" <songxiaowei@hisilicon.com>,
"Binghui Wang" <wangbinghui@hisilicon.com>,
"Bjorn Helgaas" <bhelgaas@google.com>
Subject: [PATCH 2/5] PCI: kirin: Remove unused assignments
Date: Sun, 13 Mar 2022 14:29:30 -0500 [thread overview]
Message-ID: <20220313192933.434746-3-helgaas@kernel.org> (raw)
In-Reply-To: <20220313192933.434746-1-helgaas@kernel.org>
From: Bjorn Helgaas <bhelgaas@google.com>
hi3660_pcie_phy_init() assigned "pdev", but never used the value. Drop it.
Found by Krzysztof Wilczyński <kw@linux.com> using cppcheck:
$ cppcheck --enable=all --force
unreadVariable drivers/pci/controller/dwc/pcie-kirin.c:336 Variable 'pdev' is assigned a value that is never used.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/controller/dwc/pcie-kirin.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c
index fa6886d66488..5b56cedebdf1 100644
--- a/drivers/pci/controller/dwc/pcie-kirin.c
+++ b/drivers/pci/controller/dwc/pcie-kirin.c
@@ -332,9 +332,6 @@ static int hi3660_pcie_phy_init(struct platform_device *pdev,
pcie->phy_priv = phy;
phy->dev = dev;
- /* registers */
- pdev = container_of(dev, struct platform_device, dev);
-
ret = hi3660_pcie_phy_get_clk(phy);
if (ret)
return ret;
--
2.25.1
next prev parent reply other threads:[~2022-03-13 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-13 19:29 [PATCH 0/5] PCI: Remove unused assignments Bjorn Helgaas
2022-03-13 19:29 ` [PATCH 1/5] " Bjorn Helgaas
2022-03-13 19:29 ` Bjorn Helgaas [this message]
2022-03-13 19:29 ` [PATCH 3/5] PCI: fu740: " Bjorn Helgaas
2022-03-13 19:29 ` [PATCH 4/5] PCI: cpqphp: " Bjorn Helgaas
2022-03-13 19:29 ` [PATCH 5/5] PCI: ibmphp: " Bjorn Helgaas
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=20220313192933.434746-3-helgaas@kernel.org \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=greentime.hu@sifive.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=songxiaowei@hisilicon.com \
--cc=wangbinghui@hisilicon.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