Re: [PATCH] 2.5.44 - neofb-0.4

From: Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Date: Wed Oct 30 2002 - 12:24:43 EST


Em Wed, Oct 30, 2002 at 05:56:21PM +0100, Denis Oliver Kropp escreveu:
> diff -Naur linux-2.4.20-rc1/drivers/video/neofb.c linux-2.4.20-rc1-neofb-0.4/drivers/video/neofb.c
> --- linux-2.4.20-rc1/drivers/video/neofb.c 2002-10-30 15:20:39.000000000 +0100
> +++ linux-2.4.20-rc1-neofb-0.4/drivers/video/neofb.c 2002-10-30 15:49:30.000000000 +0100
> static int disabled = 0;
> static int internal = 0;
> static int external = 0;
> +static int libretto = 0;
> static int nostretch = 0;
> static int nopciburst = 0;

Could you just leave those globas uninitialized? That way it goes to the .bss
that will get zeroed anyway and the image will be slightly smaller.

> +static struct fb_var_screeninfo __devinitdata neofb_var800x480x8 = {
> + accel_flags: FB_ACCELF_TEXT,
> + xres: 800,
> + yres: 480,
> + xres_virtual: 800,
> + yres_virtual: 30000,
> + bits_per_pixel: 8,
> + pixclock: 25000,
> + left_margin: 88,
> + right_margin: 40,
> + upper_margin: 23,
> + lower_margin: 1,
> + hsync_len: 128,
> + vsync_len: 4,
> + sync: FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
> + vmode: FB_VMODE_NONINTERLACED
> +};

Please use ANSI C designated elements style, also supported by gcc and
that was the reason for massive conversion all over the kernel, it should
look like this:

static struct fb_var_screeninfo __devinitdata neofb_var800x480x8 = {
        .accel_flags = FB_ACCELF_TEXT,
        .xres = 800,
        .yres = 480,
<snip>

> static struct fb_var_screeninfo __devinitdata neofb_var1024x768x8 = {
> accel_flags: FB_ACCELF_TEXT,
> xres: 1024,

ditto

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:51 EST