]> git.baikalelectronics.ru Git - kernel.git/commitdiff
PCI: dwc: Add braces to multi-line if-else statements
authorBaikal Electronics <support@baikalelectronics.ru>
Fri, 24 Jun 2022 14:34:17 +0000 (17:34 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 6 Jul 2022 00:00:52 +0000 (19:00 -0500)
Add braces around single-line if-else statements when the opposite case
requires them.

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

index 13c2e73f0eaf84ebf461df730cd8a711c07a92f3..7ad349c32082fd1912ef2876898eeeebbd7ff755 100644 (file)
@@ -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);
index 5848cc520b52e6d416d124b043ba3b665ed3ba7c..d0061735b43434e7483055d27d5246d1d0304559 100644 (file)
@@ -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");