Skip to contentSkip to conversation

s390/sclp_vt220: fix unused function warning

PATCH Applied Randy Dunlap 2 participants 2 messages Sep 27, 2021 – Sep 28, 2021 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Christian Borntraeger <[email protected]>

---
Sorry, I can't determine what the Fixes: tag for this should be (missing some git fu).

 drivers/s390/char/sclp_vt220.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/char/sclp_vt220.c +2 -2
@@ -768,6 +768,8 @@ out_driver:
 }
 __initcall(sclp_vt220_tty_init);
 
+#ifdef CONFIG_SCLP_VT220_CONSOLE
+
 static void __sclp_vt220_flush_buffer(void)
 {
 	unsigned long flags;
@@ -784,8 +786,6 @@ static void __sclp_vt220_flush_buffer(vo
 	spin_unlock_irqrestore(&sclp_vt220_lock, flags);
 }
 
-#ifdef CONFIG_SCLP_VT220_CONSOLE
-
 static void
 sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count)
 {
maintainer Applied
#1 lore raw
Quoted 7 lines · Randy Dunlap

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.

Quoted 8 lines
Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Christian Borntraeger <[email protected]>

---
Sorry, I can't determine what the Fixes: tag for this should be (missing some git fu).

It's not worth spending time to figure this out.

Applied, thanks!