Messages in this thread |  | | | Date | Thu, 13 Jul 2006 12:21:05 -0700 (PDT) | | From | Linus Torvalds <> | | Subject | Re: [patch] lockdep: annotate mm/slab.c |
| |
On Thu, 13 Jul 2006, Arjan van de Ven wrote:
> On Thu, 2006-07-13 at 11:50 -0700, Linus Torvalds wrote: > > > > Why isn't the "on_slab_key" local to just the init_lock_keys() > > function, > > and the #ifdef around it all? > > it's the same net results; the variable is 0 bytes in size for !LOCKDEP
That's not why I reacted. I reacted because the code is ugly, and would be much cleaner if it had everything in one place.
Btw, the variable size for !LOCKDEP is totally irrelevant: you need to have it inside the #ifdef LOCKDEP _anyway_, if only yo shut up gcc about unused static variables. Which you did do, by duplicating the function (once empty), and having an #else part to it all.
Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |