[PATCH] UBUNTU: SAUCE: vesafb: Cleanup compile warnings

Colin Ian King colin.king at canonical.com
Wed Mar 27 13:45:52 UTC 2013


On 27/03/13 13:07, Tim Gardner wrote:
>  From our SAUCE patch "UBUNTU: SAUCE: (no-up) Modularize vesafb" :
>
>     drivers/video/vesafb.c: In function '__check_redraw':
>>> drivers/video/vesafb.c:70:84: warning: return from incompatible pointer type [enabled by default]
>     drivers/video/vesafb.c: In function '__check_ypan':
>>> drivers/video/vesafb.c:71:82: warning: return from incompatible pointer type [enabled by default]
>     drivers/video/vesafb.c: In function '__check_ywrap':
>>> drivers/video/vesafb.c:72:83: warning: return from incompatible pointer type [enabled by default]
>     drivers/video/vesafb.c: In function '__check_vgapal':
>>> drivers/video/vesafb.c:73:84: warning: return from incompatible pointer type [enabled by default]
>     drivers/video/vesafb.c: In function '__check_pmipal':
>>> drivers/video/vesafb.c:75:84: warning: return from incompatible pointer type [enabled by default]
>     drivers/video/vesafb.c: In function '__check_mtrr':
>>> drivers/video/vesafb.c:77:82: warning: return from incompatible pointer type [enabled by default]
>     drivers/video/vesafb.c: In function '__check_nomtrr':
>>> drivers/video/vesafb.c:79:84: warning: return from incompatible pointer type [enabled by default]
>
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---
>   drivers/video/vesafb.c |   13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
> index eb78a59..1048814 100644
> --- a/drivers/video/vesafb.c
> +++ b/drivers/video/vesafb.c
> @@ -55,13 +55,14 @@ static struct fb_fix_screeninfo vesafb_fix = {
>   #ifndef MODULE
>   static int   inverse    __read_mostly;
>   #endif
> -static int   mtrr       __read_mostly = 3;	/* disable mtrr */
> +static uint   mtrr       __read_mostly = 3;	/* disable mtrr */
> +static bool   nomtrr     __read_mostly;		/* dummy */
>   static int   vram_remap __initdata;		/* Set amount of memory to be used */
>   static int   vram_total __initdata;		/* Set total amount of memory */
> -static int   pmi_setpal __read_mostly = 1;	/* pmi for palette changes ??? */
> -static int	redraw		__read_mostly;
> -static int   ypan       __read_mostly;		/* 0..nothing, 1..ypan, 2..ywrap */
> -static int	ywrap		__read_mostly;
> +static bool   pmi_setpal __read_mostly = 1;	/* pmi for palette changes ??? */

I'm going to be pedantic:

there are a bunch of assignments to pmi_setpal that are 0 and 1, perhaps 
these need to also changed to false and true now that this is a bool.

> +static bool	redraw     __read_mostly;
> +static bool   ypan       __read_mostly;		/* 0..nothing, 1..ypan, 2..ywrap */

ypan is set to 2 if ypan is set, so this is not exactly a bool value of 
true or false.

> +static bool	ywrap		__read_mostly;
>   static void  (*pmi_start)(void) __read_mostly;
>   static void  (*pmi_pal)  (void) __read_mostly;
>   static int   depth      __read_mostly;
> @@ -76,7 +77,7 @@ module_param_named(pmipal, pmi_setpal, bool, 0);
>   MODULE_PARM_DESC(pmipal, "Use PMI for setting palette");
>   module_param(mtrr, uint, 0);
>   MODULE_PARM_DESC(mtrr, "Enable MTRR support (default)");
> -module_param_named(nomtrr, mtrr, invbool, 0);
> +module_param_named(nomtrr, nomtrr, invbool, 0);
>   MODULE_PARM_DESC(nomtrr, "Disable MTRR support");
>   module_param(vram_remap, int, 0);
>   MODULE_PARM_DESC(vram_remap, "Set total amount of memory to be used");
>





More information about the kernel-team mailing list