Re: [PATCH] fb: amifb: fix build warnings when not builtin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Randy,

On Fri, Jul 27, 2018 at 2:00 AM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>
> Fix build warning when built as a loadable module.
> amifb_setup() and amifb_setup_mcap() are only needed when the driver
> is builtin.
> This matches how the functions are called (using #ifndef MODULE).
>
> ../drivers/video/fbdev/amifb.c:2344:19: warning: 'amifb_setup' defined but not used [-Wunused-function]
>  static int __init amifb_setup(char *options)
>
> ../drivers/video/fbdev/amifb.c:2307:20: warning: 'amifb_setup_mcap' defined but not used [-Wunused-function]
>  static void __init amifb_setup_mcap(char *spec)

Thanks for your patch!

> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Ideally, amifb_setup() should be called in the modular case, too.
But probably nobody cares.

> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: linux-fbdev@xxxxxxxxxxxxxxx
> ---
>  drivers/video/fbdev/amifb.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-next-20180717.orig/drivers/video/fbdev/amifb.c
> +++ linux-next-20180717/drivers/video/fbdev/amifb.c
> @@ -2303,7 +2303,7 @@ static void ami_build_copper(struct fb_i
>         ami_rebuild_copper(info->par);
>  }
>
> -
> +#ifndef MODULE
>  static void __init amifb_setup_mcap(char *spec)
>  {
>         char *p;
> @@ -2368,7 +2368,7 @@ static int __init amifb_setup(char *opti
>
>         return 0;
>  }
> -
> +#endif
>
>  static int amifb_check_var(struct fb_var_screeninfo *var,
>                            struct fb_info *info)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux