[lkml]   [2000]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] removal of "static foo = 0"
On Sun, 26 Nov 2000, John Alvord wrote:

> On Sun, 26 Nov 2000 04:25:05 +0000 (GMT), Alan Cox
> <> wrote:
> >> AB> of changes that yield a negligable advantage and reduce stability
> >> AB> a tiny little bit. That is pushing Linux in the direction of this
> >> AB> abyss. You notice that the view gets better, and I get nervous.
> >>
> >> Can somebody stop this train load of bunk?
> >>
> >> Uninitialized global variables always have a initial value of
> >> zero. Static or otherwise. Period.
> >
> >That isnt what Andries is arguing about. Read harder. Its semantic differences
> >rather than code differences.
> >
> > static int a=0;
> >
> >says 'I thought about this. I want it to start at zero. I've written it this
> >way to remind of the fact'
> >
> >Sure it generates the same code
> It also says "I do not know much about the details of the kernel C
> environment. In particular I do not know that all static variables are
> initialized to 0 in the kernel startup. I have not read setup.S."

Are you positive for modules too...

Regardless of the fact you have displayed, some of us prefer to clobber it
to insure that it stays zero until access. Last thing you want is an
unstatic static when we go to spin a disk for data.

Just how warm and fuzzy do you fell if your block drivers do not insure
this point?


Andre Hedrick
Linux ATA Development

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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