From: Serge Semin <Sergey.Semin@baikalelectronics.ru> To: "Jingoo Han" <jingoohan1@gmail.com>, "Gustavo Pimentel" <gustavo.pimentel@synopsys.com>, "Bjorn Helgaas" <bhelgaas@google.com>, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>, "Rob Herring" <robh@kernel.org>, "Krzysztof Wilczyński" <kw@linux.com> Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>, Serge Semin <fancer.lancer@gmail.com>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>, Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>, Frank Li <Frank.Li@nxp.com>, <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v3 06/13] PCI: dwc: Add braces to the multi-line if-else statements Date: Tue, 17 May 2022 15:50:51 +0300 [thread overview] Message-ID: <20220517125058.18488-7-Sergey.Semin@baikalelectronics.ru> (raw) In-Reply-To: <20220517125058.18488-1-Sergey.Semin@baikalelectronics.ru> 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@baikalelectronics.ru> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> --- 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 347251bf87d0..ef995e006cf0 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
next prev parent reply other threads:[~2022-05-17 12:51 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-17 12:50 [PATCH v3 00/13] PCI: dwc: Various fixes and cleanups Serge Semin 2022-05-17 12:50 ` [PATCH v3 01/13] PCI: dwc: Stop link in the host init error and de-initialization Serge Semin 2022-05-26 21:30 ` Rob Herring 2022-05-17 12:50 ` [PATCH v3 02/13] PCI: dwc: Don't use generic IO-ops for DBI-space access Serge Semin 2022-05-26 21:29 ` Rob Herring 2022-05-27 16:05 ` Serge Semin 2022-05-27 17:39 ` Serge Semin 2022-05-31 16:09 ` Rob Herring 2022-05-31 18:46 ` Serge Semin 2022-05-17 12:50 ` [PATCH v3 03/13] PCI: dwc: Add unroll iATU space support to the regions disable method Serge Semin 2022-05-17 12:50 ` [PATCH v3 04/13] PCI: dwc: Disable outbound windows for controllers with iATU Serge Semin 2022-05-17 12:50 ` [PATCH v3 05/13] PCI: dwc: Set INCREASE_REGION_SIZE flag based on limit address Serge Semin 2022-05-17 12:50 ` Serge Semin [this message] 2022-05-17 12:50 ` [PATCH v3 07/13] PCI: dwc: Add trailing new-line literals to the log messages Serge Semin 2022-05-17 12:50 ` [PATCH v3 08/13] PCI: dwc: Discard IP-core version checking on unrolled iATU detection Serge Semin 2022-05-17 12:50 ` [PATCH v3 09/13] PCI: dwc: Convert Link-up status method to using dw_pcie_readl_dbi() Serge Semin 2022-05-17 12:50 ` [PATCH v3 10/13] PCI: dwc: Deallocate EPC memory on EP init error Serge Semin 2022-05-17 12:50 ` [PATCH v3 11/13] PCI: dwc-plat: Simplify the probe method return value handling Serge Semin 2022-05-17 12:50 ` [PATCH v3 12/13] PCI: dwc-plat: Discard unused regmap pointer Serge Semin 2022-05-17 12:50 ` [PATCH v3 13/13] PCI: dwc-plat: Drop dw_plat_pcie_of_match forward declaration Serge Semin
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=20220517125058.18488-7-Sergey.Semin@baikalelectronics.ru \ --to=sergey.semin@baikalelectronics.ru \ --cc=Alexey.Malahov@baikalelectronics.ru \ --cc=Frank.Li@nxp.com \ --cc=Pavel.Parkhomenko@baikalelectronics.ru \ --cc=bhelgaas@google.com \ --cc=fancer.lancer@gmail.com \ --cc=gustavo.pimentel@synopsys.com \ --cc=jingoohan1@gmail.com \ --cc=kw@linux.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=manivannan.sadhasivam@linaro.org \ --cc=robh@kernel.org \ --subject='Re: [PATCH v3 06/13] PCI: dwc: Add braces to the multi-line if-else statements' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).