Re: [PATCH] removal of "static foo = 0" from drivers/ide (test11)

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Tue Nov 28 2000 - 03:59:24 EST


On Tue, Nov 28, 2000 at 02:19:23PM +1100, Rusty Russell wrote:
> In message <20001124224018.A5173@suse.cz> you write:
> > On Thu, Nov 23, 2000 at 10:01:53PM +1100, Rusty Russell wrote:
> > > What irritates about these monkey-see-monkey-do patches is that if I
> > > initialize a variable to NULL, it's because my code actually relies on
> > > it; I don't want that information eliminated.
> >
> > Yes, but if it generates a bigger (== worse) binary?
>
> We're talking about a few bytes, here. If you're prepared to make my
> code less clear to save bytes, you can do much better than that...

Perhaps in your case you had just an

int a = 0;

then it's really just a few bytes, but many sources have for example

int a[1024] = { 0, 0, /* .... */ };

Which in turn is a big wastage.

On the other hand, if you save "just" a few bytes in every driver, in a
way that is safe and simple (and commenting out the = 0 is a safe way),
you get a lot of space saved in the sum.

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



This archive was generated by hypermail 2b29 : Thu Nov 30 2000 - 21:00:19 EST