* [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation()
@ 2020-09-21 13:10 Qinglang Miao
2020-10-01 14:38 ` Rob Herring
2020-10-02 11:54 ` Lorenzo Pieralisi
0 siblings, 2 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
To: Tom Joseph, Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas
Cc: linux-pci, linux-kernel, Qinglang Miao
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
drivers/pci/controller/cadence/pcie-cadence-host.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c
index 4550e0d46..811c1cb2e 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-host.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-host.c
@@ -337,7 +337,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
struct resource_entry *entry;
u64 cpu_addr = cfg_res->start;
u32 addr0, addr1, desc1;
- int r, err, busnr = 0;
+ int r, busnr = 0;
entry = resource_list_first_type(&bridge->windows, IORESOURCE_BUS);
if (entry)
@@ -383,11 +383,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
r++;
}
- err = cdns_pcie_host_map_dma_ranges(rc);
- if (err)
- return err;
-
- return 0;
+ return cdns_pcie_host_map_dma_ranges(rc);
}
static int cdns_pcie_host_init(struct device *dev,
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation()
2020-09-21 13:10 [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation() Qinglang Miao
@ 2020-10-01 14:38 ` Rob Herring
2020-10-02 11:54 ` Lorenzo Pieralisi
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-10-01 14:38 UTC (permalink / raw)
To: Qinglang Miao
Cc: linux-pci, linux-kernel, Lorenzo Pieralisi, Bjorn Helgaas, Tom Joseph
On Mon, 21 Sep 2020 21:10:53 +0800, Qinglang Miao wrote:
> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> drivers/pci/controller/cadence/pcie-cadence-host.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation()
2020-09-21 13:10 [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation() Qinglang Miao
2020-10-01 14:38 ` Rob Herring
@ 2020-10-02 11:54 ` Lorenzo Pieralisi
1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2020-10-02 11:54 UTC (permalink / raw)
To: Qinglang Miao
Cc: Tom Joseph, Rob Herring, Bjorn Helgaas, linux-pci, linux-kernel
On Mon, Sep 21, 2020 at 09:10:53PM +0800, Qinglang Miao wrote:
> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> drivers/pci/controller/cadence/pcie-cadence-host.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
Applied to pci/cadence, thanks.
Lorenzo
> diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c
> index 4550e0d46..811c1cb2e 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence-host.c
> +++ b/drivers/pci/controller/cadence/pcie-cadence-host.c
> @@ -337,7 +337,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
> struct resource_entry *entry;
> u64 cpu_addr = cfg_res->start;
> u32 addr0, addr1, desc1;
> - int r, err, busnr = 0;
> + int r, busnr = 0;
>
> entry = resource_list_first_type(&bridge->windows, IORESOURCE_BUS);
> if (entry)
> @@ -383,11 +383,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
> r++;
> }
>
> - err = cdns_pcie_host_map_dma_ranges(rc);
> - if (err)
> - return err;
> -
> - return 0;
> + return cdns_pcie_host_map_dma_ranges(rc);
> }
>
> static int cdns_pcie_host_init(struct device *dev,
> --
> 2.23.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-02 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation() Qinglang Miao
2020-10-01 14:38 ` Rob Herring
2020-10-02 11:54 ` Lorenzo Pieralisi
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).