[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200612041206.kB4C61ia004849@laptop13.inf.utfsm.cl>
Date: Mon, 04 Dec 2006 09:06:01 -0300
From: "Horst H. von Brand" <vonbrand@....utfsm.cl>
To: Randy Dunlap <randy.dunlap@...cle.com>
cc: Bela Lubkin <blubkin@...are.com>, Andrew Morton <akpm@...l.org>,
Corey Minyard <minyard@....org>,
OpenIPMI Developers <openipmi-developer@...ts.sourceforge.net>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Joseph Barnett <jbarnett@...orola.com>
Subject: Re: [Openipmi-developer] [PATCH 9/12] IPMI: add pigeonpoint poweroff
Randy Dunlap <randy.dunlap@...cle.com> wrote:
> Bela Lubkin wrote:
> > Andrew Morton wrote:
> >
> >>> Sometime, please go through the IPMI code looking for all these
> >>> statically-allocated things which are initialised to 0 or NULL and remove
> >>> all those intialisations? They're unneeded, they increase the vmlinux
> >>> image size and there are quite a number of them. Thanks.
> > Randy Dunlop replied:
> >
> >> I was just about to send that patch. Here it is,
> >> on top of the series-of-12.
> > ...
> >> -static int bt_debug = BT_DEBUG_OFF;
> >> +static int bt_debug;
> > Is it wise to significantly degrade code readability to work around
> > a minor
> > compiler / linker bug?
>
> Is that the only one that is a problem?
>
> I don't think it's a problem. We *know* that static data areas
> are init to 0. Everything depends on that. If that didn't work
> it would all break.
Right. And we know NULL == 0.
> I could say that it's a nice coincidence that BT_DEBUG_OFF == 0,
> but I think that it's more than coincidence.
I'd have had to look over the code to find out what it was initialized
to. In cases where it is not an explicit 0/NULL, I'd leave it as is. It
could also break if somebody later on changes the value of BT_DEBUG_OFF
(yes, very unlikely, but...).
Bug your friendly GCC guy to loose static initializations to zero
(shouldn't be /that/ hard to do...) instead of obfuscating kernel's code.
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria +56 32 2654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 2797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists