]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] slab: have index_of bug at compile time
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 1 Feb 2006 11:05:44 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:17 +0000 (08:53 -0800)
commitc5fbe3de18604e34f590aa07f482b673cf3b81df
tree2ef8bf7484700b49bae1b3c1191e04a80b78b102
parentab5ebfa311fddcf5cc1eb943db25e5e4a5044900
[PATCH] slab: have index_of bug at compile time

I noticed the code for index_of is a creative way of finding the cache
index using the compiler to optimize to a single hard coded number.  But
I couldn't help noticing that it uses two methods to let you know that
someone used it wrong.  One is at compile time (the correct way), and
the other is at run time (not good).

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/slab.c