lkml.org 
[lkml]   [2000]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-fbdev] Re: [PATCH] rivafb bugfixes
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

--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- geert@linux-m68k.org

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


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.103 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site