public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Qinglang Miao <miaoqinglang@huawei.com>
Cc: Tom Joseph <tjoseph@cadence.com>, Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] PCI: cadence: simplify the return expression of cdns_pcie_host_init_address_translation()
Date: Fri, 2 Oct 2020 12:54:31 +0100	[thread overview]
Message-ID: <20201002115430.GC23640@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200921131053.92752-1-miaoqinglang@huawei.com>

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
> 

      parent reply	other threads:[~2020-10-02 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20201002115430.GC23640@e121166-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=miaoqinglang@huawei.com \
    --cc=robh@kernel.org \
    --cc=tjoseph@cadence.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox