video: fbdev: pvr2fb: fix compile-testing as module
PATCH 1/1 video: fbdev: pvr2fb: fix compile-testing as module
Building an allmodconfig kernel now produces a harmless warning:
drivers/video/fbdev/pvr2fb.c:726:12: error: unused function 'pvr2_get_param_val' [-Werror,-Wunused-function]
Shut this up the same way as we do for other unused functions in the same file, using the __maybe_unused attribute.
--- drivers/video/fbdev/pvr2fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/pvr2fb.c +2 -2
@@ -723,8 +723,8 @@ static struct fb_ops pvr2fb_ops = { .fb_imageblit = cfb_imageblit, }; -static int pvr2_get_param_val (const struct pvr2_params *p,const char *s, -int size) +static int __maybe_unused pvr2_get_param_val (const struct pvr2_params *p, +const char *s,int size) {int i;
Signature · 1 line
2.20.0
Quoted 9 lines · Arnd Bergmann
Building an allmodconfig kernel now produces a harmless warning:
drivers/video/fbdev/pvr2fb.c:726:12: error: unused function 'pvr2_get_param_val' [-Werror,-Wunused-function]Shut this up the same way as we do for other unused functions in the same file, using the
__maybe_unusedattribute.Fixes 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")Signed-off-by Arnd Bergmann <[email protected]>
Thanks but I've fixed it already by adding #ifndef MODULE (since other functions in the same file using __maybe_unused depend on either PCI or SH_DREAMCAST I've preferred not to use this attribute):
https://marc.info/?l=linux-fbdev&m=156050904010778&w=2
Quoted 9 lines
--- drivers/video/fbdev/pvr2fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/video/fbdev/pvr2fb.c +0
-0
drivers/video/fbdev/pvr2fb.c static struct fb_ops pvr2fb_ops = { · line 729
Quoted 9 lines
drivers/video/fbdev/pvr2fb.c +2
-2@@ -723,8 +723,8 @@ static struct fb_ops pvr2fb_ops = { .fb_imageblit = cfb_imageblit, }; -static int pvr2_get_param_val (const struct pvr2_params *p,const char *s, -int size) +static int __maybe_unused pvr2_get_param_val (const struct pvr2_params *p, +const char *s,int size) {int i;
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 10 lines · Bartlomiej Zolnierkiewicz
Quoted 7 lines · Arnd Bergmann
Building an allmodconfig kernel now produces a harmless warning:
drivers/video/fbdev/pvr2fb.c:726:12: error: unused function 'pvr2_get_param_val' [-Werror,-Wunused-function]Shut this up the same way as we do for other unused functions in the same file, using the
__maybe_unusedattribute.
Quoted 8 lines
Quoted 2 lines
Fixes 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")Signed-off-by Arnd Bergmann <[email protected]>Thanks but I've fixed it already by adding #ifndef MODULE (since other functions in the same file using
__maybe_unuseddepend on either PCI orSH_DREAMCASTI've preferred not to use this attribute):
Ok, dropping my patch from the local queue, your version is obviously correct as well.
Arnd