Commit bca2d042 authored by Randy Dunlap's avatar Randy Dunlap Committed by Vasily Gorbik

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: default avatarRandy 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.orgSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent d340d28a
...@@ -768,6 +768,8 @@ static int __init sclp_vt220_tty_init(void) ...@@ -768,6 +768,8 @@ static int __init sclp_vt220_tty_init(void)
} }
__initcall(sclp_vt220_tty_init); __initcall(sclp_vt220_tty_init);
#ifdef CONFIG_SCLP_VT220_CONSOLE
static void __sclp_vt220_flush_buffer(void) static void __sclp_vt220_flush_buffer(void)
{ {
unsigned long flags; unsigned long flags;
...@@ -784,8 +786,6 @@ static void __sclp_vt220_flush_buffer(void) ...@@ -784,8 +786,6 @@ static void __sclp_vt220_flush_buffer(void)
spin_unlock_irqrestore(&sclp_vt220_lock, flags); spin_unlock_irqrestore(&sclp_vt220_lock, flags);
} }
#ifdef CONFIG_SCLP_VT220_CONSOLE
static void static void
sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count) sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment