Re: [PATCH v4 11/18] PCI: dwc: Organize local variables usage

Rob Herring
2022-06-13T21:01:24Z

On Fri, Jun 10, 2022 at 11:25:27AM +0300, Serge Semin wrote:
> There are several places in the common DW PCIe code with incoherent local
> variables usage: a variable is defined and initialized with a structure
> field, but the structure pointer is de-referenced 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's mainly concerns the pcie_port.dev field. Let's fix that in the
> relevant places.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Changelog v4:
> - This is a new patch created on the v4 lap of the series.
> ---
> drivers/pci/controller/dwc/pcie-designware-host.c | 14 +++++++-------
> drivers/pci/controller/dwc/pcie-designware.c | 8 +++-----
> 2 files changed, 10 insertions(+), 12 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>