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

tty: serial: pmac_zilog: Remove unused disposable variable 'garbage'

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

drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-serial@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20201112105857.2078977-5-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lee Jones and committed by
Greg Kroah-Hartman
59105f9c a609c580

+4 -4
+4 -4
drivers/tty/serial/pmac_zilog.h
··· 362 362 363 363 /* Misc macros */ 364 364 #define ZS_CLEARERR(port) (write_zsreg(port, 0, ERR_RES)) 365 - #define ZS_CLEARFIFO(port) do { volatile unsigned char garbage; \ 366 - garbage = read_zsdata(port); \ 367 - garbage = read_zsdata(port); \ 368 - garbage = read_zsdata(port); \ 365 + #define ZS_CLEARFIFO(port) do { \ 366 + read_zsdata(port); \ 367 + read_zsdata(port); \ 368 + read_zsdata(port); \ 369 369 } while(0) 370 370 371 371 #define ZS_IS_CONS(UP) ((UP)->flags & PMACZILOG_FLAG_IS_CONS)