fbdev: atyfb: always declare aty_{ld,st}_lcd()
PATCH 1/1 fbdev: atyfb: always declare aty_{ld,st}_lcd()
The previously added stubs for aty_{ld,}st_lcd() make it so that these functions are used regardless of the config options that were guarding them, so remove the #ifdef/#endif lines and make their declarations always visible. This fixes build warnings that were reported by clang:
drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes] void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
^
drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes] u32 aty_ld_lcd(int index, const struct atyfb_par *par)
^
drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u32 aty_ld_lcd(int index, const struct atyfb_par *par)
They should not be marked as static since they are used in mach64_ct.c.
--- drivers/video/fbdev/aty/atyfb.h | 3 --- 1 file changed, 3 deletions(-)
drivers/video/fbdev/aty/atyfb.h +0 -3
@@ -287,11 +287,8 @@ static inline void aty_st_8(int regindex#endif } -#if defined(CONFIG_PMAC_BACKLIGHT ) || defined (CONFIG_FB_ATY_GENERIC_LCD ) || \ -defined (CONFIG_FB_ATY_BACKLIGHT )extern void aty_st_lcd (int index,u32 val,const struct atyfb_par *par);extern u32 aty_ld_lcd (int index,const struct atyfb_par *par); -#endif /* * DAC operations
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Randy Dunlap
The previously added stubs for aty_{ld,}st_lcd() make it so that these functions are used regardless of the config options that were guarding them, so remove the #ifdef/#endif lines and make their declarations always visible. This fixes build warnings that were reported by clang:
Yes, though I think GCC would warn similarly with W=1 builds as well, which was set for the 0day bot report.
Quoted 7 lines
drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes] voidaty_st_lcd(int index, u32 val, const struct atyfb_par *par)^
drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit voidaty_st_lcd(int index, u32 val, const struct atyfb_par *par)
Quoted 8 lines
drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes] u32aty_ld_lcd(int index, const struct atyfb_par *par)^
drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u32aty_ld_lcd(int index, const struct atyfb_par *par)They should not be marked as static since they are used in
mach64_ct.c.
Probably don't need to be marked extern either (since that's the implicit default), but I don't feel strongly about it.
Thanks for sending a cleanup for this.
Quoted 30 lines
Fixes bfa5782b9caa ("fbdev: atyfb: add stubs for aty_{ld,st}_lcd()")Signed-off-by Randy Dunlap <[email protected]>Reported-by kernel test robot <[email protected]>Cc Daniel Vetter <[email protected]>Cc Nick Desaulniers <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Cc Sam Ravnborg <[email protected]>Cc David Airlie <[email protected]>Cc Jani Nikula <[email protected]>--- drivers/video/fbdev/aty/atyfb.h | 3 --- 1 file changed, 3 deletions(-)drivers/video/fbdev/aty/atyfb.h +0
-3@@ -287,11 +287,8 @@ static inline void aty_st_8(int regindex#endif } -#if defined(CONFIG_PMAC_BACKLIGHT ) || defined (CONFIG_FB_ATY_GENERIC_LCD ) || \ -defined (CONFIG_FB_ATY_BACKLIGHT )extern void aty_st_lcd (int index,u32 val,const struct atyfb_par *par);extern u32 aty_ld_lcd (int index,const struct atyfb_par *par); -#endif /* * DAC operations
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 11 lines · Nick Desaulniers
Quoted 6 lines · Randy Dunlap
The previously added stubs for aty_{ld,}st_lcd() make it so that these functions are used regardless of the config options that were guarding them, so remove the #ifdef/#endif lines and make their declarations always visible. This fixes build warnings that were reported by clang:
Yes, though I think GCC would warn similarly with W=1 builds as well, which was set for the 0day bot report.
<knocks head> I should enable that until it hurts too much.
Quoted 13 lines
Quoted 13 lines
drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes] voidaty_st_lcd(int index, u32 val, const struct atyfb_par *par)^
drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit voidaty_st_lcd(int index, u32 val, const struct atyfb_par *par)
drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes] u32aty_ld_lcd(int index, const struct atyfb_par *par)^
drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u32aty_ld_lcd(int index, const struct atyfb_par *par)
Quoted 5 lines
Quoted 2 lines
They should not be marked as static since they are used in
mach64_ct.c.Probably don't need to be marked extern either (since that's the implicit default), but I don't feel strongly about it.
Yeah, I was just leaving it as it was...
Quoted 18 lines
Thanks for sending a cleanup for this.
Acked-by Nick Desaulniers <[email protected]>Quoted 15 lines
Fixes bfa5782b9caa ("fbdev: atyfb: add stubs for aty_{ld,st}_lcd()")Signed-off-by Randy Dunlap <[email protected]>Reported-by kernel test robot <[email protected]>Cc Daniel Vetter <[email protected]>Cc Nick Desaulniers <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Cc Sam Ravnborg <[email protected]>Cc David Airlie <[email protected]>Cc Jani Nikula <[email protected]>--- drivers/video/fbdev/aty/atyfb.h | 3 --- 1 file changed, 3 deletions(-)
Signature · 6 lines
~Randy _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel