Skip to contentSkip to conversation

MIPS: Octeon: remove unneeded variable

PATCH In review [email protected] 2 participants 2 messages Jun 14, 2023 1 message not in the archive MIPS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 MIPS: Octeon: remove unneeded variable

fix the following coccicheck warning:

arch/mips/cavium-octeon/executive/cvmx-spi.c:152:5-8: Unneeded variable: "res".

---
 arch/mips/cavium-octeon/executive/cvmx-spi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/mips/cavium-octeon/executive/cvmx-spi.c +0 -0
index eb9333e84a6b..1f8b85473677 100644
@@ -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);

#2 lore raw
Quoted 4 lines · On Wed, 14 Jun 2023, [email protected] wrote:

fix the following coccicheck warning:

arch/mips/cavium-octeon/executive/cvmx-spi.c:152:5-8: Unneeded variable:
"res".

Have you actually tried to rebuild with your "fix" applied? Please
always do before submitting patches.

Maciej