PCI: dwc: Organize local variable usage
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Fri, 24 Jun 2022 14:34:21 +0000 (17:34 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 6 Jul 2022 00:00:52 +0000 (19:00 -0500)
commit60a4352f648c08902599cc06be12f9d1b475f31e
tree600385cd518f954711eea32f4e52b627c92faae1
parent3869e9a3ba385d5d0798076ab9cfa7eb91262e50
PCI: dwc: Organize local variable usage

There are several places in the common DW PCIe code with incoherent local
variable usage: a variable is defined and initialized with a structure
field, but the structure pointer is dereferenced to access that field
anyway; the local variable is defined and initialized but either used just
once or not used afterwards in the main part of the subsequent method.  It
mainly concerns the pcie_port.dev field. Fix that in the relevant places.

Link: https://lore.kernel.org/r/20220624143428.8334-12-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.c