From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: cgel.zte@gmail.com
Cc: maz@kernel.org, ilya.lipnitskiy@gmail.com,
chi.minghao@zte.com.cn, ryazanov.s.a@gmail.com,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] mips/pci: remove redundant ret variable
Date: Wed, 5 Jan 2022 09:54:52 +0100 [thread overview]
Message-ID: <20220105085452.GA5406@alpha.franken.de> (raw)
In-Reply-To: <20220104112024.601765-1-chi.minghao@zte.com.cn>
On Tue, Jan 04, 2022 at 11:20:24AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return value from rt3883_pci_r32() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
> arch/mips/pci/pci-rt3883.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c
> index d3c947fa2969..e07ae098bdd8 100644
> --- a/arch/mips/pci/pci-rt3883.c
> +++ b/arch/mips/pci/pci-rt3883.c
> @@ -102,14 +102,12 @@ static u32 rt3883_pci_read_cfg32(struct rt3883_pci_controller *rpc,
> unsigned func, unsigned reg)
> {
> u32 address;
> - u32 ret;
>
> address = rt3883_pci_get_cfgaddr(bus, slot, func, reg);
>
> rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
> - ret = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
>
> - return ret;
> + return rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
> }
>
> static void rt3883_pci_write_cfg32(struct rt3883_pci_controller *rpc,
> --
> 2.25.1
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2022-01-05 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 11:20 [PATCH] mips/pci: remove redundant ret variable cgel.zte
2022-01-05 8:54 ` Thomas Bogendoerfer [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=20220105085452.GA5406@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=ilya.lipnitskiy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maz@kernel.org \
--cc=ryazanov.s.a@gmail.com \
--cc=zealci@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).