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:40:44 +0800 [thread overview]
Message-ID: <ce48e2d625bdd4766496d44ae089e9de@208suo.com> (raw)
In-Reply-To: <20230614023829.23752-1-luojianhong@cdjrlc.com>
fix the following coccicheck warning:
arch/mips/cavium-octeon/executive/cvmx-spi.c:152: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 eb9333e84a6b..1f8b85473677 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-spi.c
@@ -149,10 +149,9 @@ int cvmx_spi_start_interface(int interface,
cvmx_spi_mode_t mode, int timeout,
*/
int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode, int
timeout)
{
- int res = -1;
if (!(OCTEON_IS_MODEL(OCTEON_CN38XX) ||
OCTEON_IS_MODEL(OCTEON_CN58XX)))
- return res;
+ return -1;
cvmx_dprintf("SPI%d: Restart %s\n", interface, modes[mode]);
@@ -175,7 +174,7 @@ int cvmx_spi_restart_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;
}
EXPORT_SYMBOL_GPL(cvmx_spi_restart_interface);
next parent reply other threads:[~2023-06-14 2:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230614023829.23752-1-luojianhong@cdjrlc.com>
2023-06-14 2:40 ` baomingtong001 [this message]
2023-06-14 14:47 ` Maciej W. Rozycki
[not found] <20230614024408.46240-1-luojianhong@cdjrlc.com>
2023-06-14 2:51 ` baomingtong001
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=ce48e2d625bdd4766496d44ae089e9de@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®