lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdn5mF4UQ9F1h-ZSRKUk3Yq8QS4AExV6kCFY88W3KsK72g@mail.gmail.com>
Date:   Wed, 24 Feb 2021 14:07:23 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel test robot <lkp@...el.com>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        linux-fbdev@...r.kernel.org,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Sam Ravnborg <sam@...nborg.org>,
        David Airlie <airlied@...ux.ie>,
        Jani Nikula <jani.nikula@...ux.intel.com>
Subject: Re: [PATCH -next] fbdev: atyfb: always declare aty_{ld,st}_lcd()

On Wed, Feb 24, 2021 at 1:55 PM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> 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.

>
>    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.

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.
Acked-by: Nick Desaulniers <ndesaulniers@...gle.com>

>
> Fixes: bfa5782b9caa ("fbdev: atyfb: add stubs for aty_{ld,st}_lcd()")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Reported-by: kernel test robot <lkp@...el.com>
> Cc: Daniel Vetter <daniel.vetter@...ll.ch>
> Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> Cc: linux-fbdev@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Cc: Sam Ravnborg <sam@...nborg.org>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Jani Nikula <jani.nikula@...ux.intel.com>
> ---
>  drivers/video/fbdev/aty/atyfb.h |    3 ---
>  1 file changed, 3 deletions(-)
>
> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb.h
> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb.h
> @@ -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



-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ