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

s390/sclp_vt220: fix unused function warning

When CONFIG_SCLP_VT220_TTY=y and CONFIG_SCLP_VT220_CONSOLE is not set:

../drivers/s390/char/sclp_vt220.c:771:13: warning: '__sclp_vt220_flush_buffer' defined but not used [-Wunused-function]
771 | static void __sclp_vt220_flush_buffer(void)

so move this function inside the #ifdef block where it is used.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Link: https://lore.kernel.org/r/20210927215647.11506-1-rdunlap@infradead.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Randy Dunlap and committed by
Vasily Gorbik
bca2d042 d340d28a

+2 -2
+2 -2
drivers/s390/char/sclp_vt220.c
··· 768 768 } 769 769 __initcall(sclp_vt220_tty_init); 770 770 771 + #ifdef CONFIG_SCLP_VT220_CONSOLE 772 + 771 773 static void __sclp_vt220_flush_buffer(void) 772 774 { 773 775 unsigned long flags; ··· 785 783 } 786 784 spin_unlock_irqrestore(&sclp_vt220_lock, flags); 787 785 } 788 - 789 - #ifdef CONFIG_SCLP_VT220_CONSOLE 790 786 791 787 static void 792 788 sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count)