Re: [linux-fbdev] Re: [PATCH] rivafb bugfixes

From: Bakonyi Ferenc (fero@drama.obuda.kando.hu)
Date: Wed Jul 05 2000 - 07:39:19 EST


Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> On Wed, 28 Jun 2000, Bakonyi Ferenc wrote:
> > 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?
>
> You indeed can't use __initdata for bss, only for data. Perhaps we need an
> __initbss :-)
>
> Gr{oetje,eeting}s,
>
> Geert

Other framebuffer drivers use it too:
egrep '(fontname|mode_option|noaccel).*__initdata' \
linux/drivers/video/*.c

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/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:16 EST