Re: [PATCH] rivafb bugfixes

Bakonyi Ferenc (fero@drama.obuda.kando.hu)
Wed, 28 Jun 2000 17:38:15 +0200


Jeff Garzik wrote:

> > /* command line data, set in rivafb_setup() */
> > -static char fontname[40] __initdata;
> > +static char fontname[40] __initdata = { 0 };
> > #ifndef MODULE
> > -static char noaccel __initdata; /* unused */
> > -static const char *mode_option __initdata;
> > +static char noaccel __initdata = 0; /* unused */
> > +static const char *mode_option __initdata = NULL;
> > #endif
>
> Looks ok except for one small thing: do not explicitly initialize these
> to zero, they are automatically zeroed. If not, it is a bug...

I did it because:

make all_targets
make[4]: Entering directory `/home/fero/linux/drivers/video/riva'
gcc -D__KERNEL__ -I/home/fero/linux/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -pipe -fno-strength-reduce -c -o
fbdev.o fbdev.c
...
fbdev.c:211: warning: section attribute ignored for uninitialized
variable `fontname'
fbdev.c:213: warning: section attribute ignored for uninitialized
variable `noaccel'
fbdev.c:214: warning: section attribute ignored for uninitialized
variable `mode_option'

Am I wrong?

Greetings:
Ferenc

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