Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: host: r8a66597-hcd: Remove set, then over-written, but never used variable 'tmp'

Looks like it's been this way since the driver's inception in 2007.

Fixes the following W=1 kernel build warning(s):

drivers/usb/host/r8a66597-hcd.c: In function ‘clear_all_buffer’:
drivers/usb/host/r8a66597-hcd.c:478:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
478 | u16 tmp;
| ^~~

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200706133341.476881-14-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lee Jones and committed by
Greg Kroah-Hartman
33a4eeb1 120d91da

+3 -5
+3 -5
drivers/usb/host/r8a66597-hcd.c
··· 475 475 static void clear_all_buffer(struct r8a66597 *r8a66597, 476 476 struct r8a66597_pipe *pipe) 477 477 { 478 - u16 tmp; 479 - 480 478 if (!pipe || pipe->info.pipenum == 0) 481 479 return; 482 480 483 481 pipe_stop(r8a66597, pipe); 484 482 r8a66597_bset(r8a66597, ACLRM, pipe->pipectr); 485 - tmp = r8a66597_read(r8a66597, pipe->pipectr); 486 - tmp = r8a66597_read(r8a66597, pipe->pipectr); 487 - tmp = r8a66597_read(r8a66597, pipe->pipectr); 483 + r8a66597_read(r8a66597, pipe->pipectr); 484 + r8a66597_read(r8a66597, pipe->pipectr); 485 + r8a66597_read(r8a66597, pipe->pipectr); 488 486 r8a66597_bclr(r8a66597, ACLRM, pipe->pipectr); 489 487 } 490 488