PCI: kirin: Remove unused assignments
authorBjorn Helgaas <bhelgaas@google.com>
Sun, 13 Mar 2022 19:29:30 +0000 (14:29 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 22 Mar 2022 16:24:13 +0000 (11:24 -0500)
hi3660_pcie_phy_init() assigned "pdev", but never used the value.  Drop it.

Found by Krzysztof 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.

Reported-by: Krzysztof WilczyƄski <kw@linux.com>
Link: https://lore.kernel.org/r/20220313192933.434746-3-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/dwc/pcie-kirin.c

index fa6886d..5b56ced 100644 (file)
@@ -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;