Commit f400f3bb authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] Remove always false check in mm/slab.c

  CC      mm/slab.o
mm/slab.c: In function `kmem_cache_create':
mm/slab.c:1129: warning: comparison of unsigned expression < 0 is always false

This comes from the fact that 'align' is size_t and so unsigned. Just to be
sure, I did
	$ grep __kernel_size_t include/*/posix_types.h
and yes, every arch defines that to be unsigned.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 99ab2a4b
......@@ -1125,8 +1125,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
in_interrupt() ||
(size < BYTES_PER_WORD) ||
(size > (1<<MAX_OBJ_ORDER)*PAGE_SIZE) ||
(dtor && !ctor) ||
(align < 0)) {
(dtor && !ctor)) {
printk(KERN_ERR "%s: Early error in slab %s\n",
__FUNCTION__, name);
BUG();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment