[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220324121306.GF2854@thinkpad>
Date: Thu, 24 Mar 2022 17:43:06 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc: Jingoo Han <jingoohan1@...il.com>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Serge Semin <fancer.lancer@...il.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
Frank Li <Frank.Li@....com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/12] PCI: dwc: Add braces to the multi-line if-else
statements
On Thu, Mar 24, 2022 at 04:25:17AM +0300, Serge Semin wrote:
> In accordance with [1] if there is at least one multi-line if-else
> clause in the statement, then each clause will need to be surrounded by
> the braces. The driver code violates that coding style rule in a few
> places. Let's fix it.
>
> [1] Documentation/process/coding-style.rst
>
> Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Thanks,
Mani
> ---
> drivers/pci/controller/dwc/pcie-designware-ep.c | 4 ++--
> drivers/pci/controller/dwc/pcie-designware.c | 3 ++-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> index 0eda8236c125..7c9315fffe24 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
> @@ -699,9 +699,9 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep)
>
> if (!pci->dbi_base2) {
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2");
> - if (!res)
> + if (!res) {
> pci->dbi_base2 = pci->dbi_base + SZ_4K;
> - else {
> + } else {
> pci->dbi_base2 = devm_pci_remap_cfg_resource(dev, res);
> if (IS_ERR(pci->dbi_base2))
> return PTR_ERR(pci->dbi_base2);
> diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> index d737af058903..9f4d2b44612b 100644
> --- a/drivers/pci/controller/dwc/pcie-designware.c
> +++ b/drivers/pci/controller/dwc/pcie-designware.c
> @@ -699,8 +699,9 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
> pci->atu_size = SZ_4K;
>
> dw_pcie_iatu_detect_regions_unroll(pci);
> - } else
> + } else {
> dw_pcie_iatu_detect_regions(pci);
> + }
>
> dev_info(pci->dev, "iATU unroll: %s\n", pci->iatu_unroll_enabled ?
> "enabled" : "disabled");
> --
> 2.35.1
>
Powered by blists - more mailing lists