From: baomingtong001@208suo.com
To: tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] MIPS: Octeon: remove unneeded variable
Date: Wed, 14 Jun 2023 10:51:35 +0800 [thread overview]
Message-ID: <998d4901de43fa640b3c383bfb6c923b@208suo.com> (raw)
In-Reply-To: <20230614024408.46240-1-luojianhong@cdjrlc.com>
fix the following coccicheck warning:
arch/mips/cavium-octeon/executive/cvmx-spi.c:108:5-8: Unneeded variable:
"res".
Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
arch/mips/cavium-octeon/executive/cvmx-spi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-spi.c
b/arch/mips/cavium-octeon/executive/cvmx-spi.c
index 1f8b85473677..5906cc551f75 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-spi.c
@@ -105,10 +105,9 @@ void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t
*new_callbacks)
int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, int
timeout,
int num_ports)
{
- int res = -1;
if (!(OCTEON_IS_MODEL(OCTEON_CN38XX) ||
OCTEON_IS_MODEL(OCTEON_CN58XX)))
- return res;
+ return -1;
/* Callback to perform SPI4 reset */
INVOKE_CB(cvmx_spi_callbacks.reset_cb, interface, mode);
@@ -130,7 +129,7 @@ int cvmx_spi_start_interface(int interface,
cvmx_spi_mode_t mode, int timeout,
/* Callback to handle interface coming up */
INVOKE_CB(cvmx_spi_callbacks.interface_up_cb, interface, mode);
- return res;
+ return -1;
}
/*
next parent reply other threads:[~2023-06-14 2:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230614024408.46240-1-luojianhong@cdjrlc.com>
2023-06-14 2:51 ` baomingtong001 [this message]
[not found] <20230614023829.23752-1-luojianhong@cdjrlc.com>
2023-06-14 2:40 ` baomingtong001
2023-06-14 14:47 ` Maciej W. Rozycki
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=998d4901de43fa640b3c383bfb6c923b@208suo.com \
--to=baomingtong001@208suo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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
all inboxes | Powered by JetHome®