Skip to contentSkip to conversation

fbcon: mark dummy functions 'inline'

PATCH In review Arnd Bergmann 3 participants 3 messages Aug 2, 2017 – Aug 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbcon: mark dummy functions 'inline'

The newly introduced fb_console_init/exit declarations have a dummy alternative that is marked 'static' in the header but not inline, leading to a warning whenever the header gets included:

In file included from drivers/video/fbdev/core/fbmem.c:35:0:
include/linux/fbcon.h:9:13: error: 'fb_console_exit' defined but not used [-Werror=unused-function]

This adds the intended 'inline'.

Fixes 6104c37094e7 ("fbcon: Make fbcon a built-time depency for fbdev")
---
 include/linux/fbcon.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/fbcon.h +2 -2
index 0fac6305d51c..f68a7db14165 100644
@@ -5,8 +5,8 @@
 void __init fb_console_init(void);
 void __exit fb_console_exit(void);
 #else
-static void fb_console_init(void) {}
-static void fb_console_exit(void) {}
+static inline void fb_console_init(void) {}
+static inline void fb_console_exit(void) {}
 #endif
 
 #endif /* _LINUX_FBCON_H */
Signature · 1 line
2.9.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnd Bergmann

The newly introduced fb_console_init/exit declarations have a dummy alternative that is marked 'static' in the header but not inline, leading to a warning whenever the header gets included:

In file included from drivers/video/fbdev/core/fbmem.c:35:0:
include/linux/fbcon.h:9:13: error: 'fb_console_exit' defined but not used [-Werror=unused-function]

This adds the intended 'inline'.

Fixes 6104c37094e7 ("fbcon: Make fbcon a built-time depency for fbdev")
Quoted 22 lines
---
 include/linux/fbcon.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/fbcon.h +2 -3
index 0fac6305d51c..f68a7db14165 100644
@@ -5,8 +5,8 @@
 void __init fb_console_init(void);
 void __exit fb_console_exit(void);
 #else
-static void fb_console_init(void) {}
-static void fb_console_exit(void) {}
+static inline void fb_console_init(void) {}
+static inline void fb_console_exit(void) {}
 #endif
 
 #endif /* _LINUX_FBCON_H */
--

2.9.0

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

The newly introduced fb_console_init/exit declarations have a dummy alternative that is marked 'static' in the header but not inline, leading to a warning whenever the header gets included:

In file included from drivers/video/fbdev/core/fbmem.c:35:0:
include/linux/fbcon.h:9:13: error: 'fb_console_exit' defined but not used [-Werror=unused-function]

This adds the intended 'inline'.

Fixes 6104c37094e7 ("fbcon: Make fbcon a built-time depency for fbdev")

Patch queued for 4.14, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics