]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Remove always false check in mm/slab.c
authorMika Kukkonen <mika@osdl.org>
Sun, 11 Jul 2004 02:33:57 +0000 (19:33 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 11 Jul 2004 02:33:57 +0000 (19:33 -0700)
  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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/slab.c

index cad4d294972a63cc33300bdae2ac048ac40538ee..6087307f778869882bed6ee42cccae54357333bd 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -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();