]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/slub_def.h
SLUB: fix ARCH_KMALLOC_MINALIGN cases 64 and 256
[karo-tx-linux.git] / include / linux / slub_def.h
index 4dcbc2c71491ec9dc736b83c1eeedb03f4650a95..aa5d4a69d461c8e21fb9df8eca681f411b8791c3 100644 (file)
@@ -152,12 +152,10 @@ static __always_inline int kmalloc_index(size_t size)
        if (size <= KMALLOC_MIN_SIZE)
                return KMALLOC_SHIFT_LOW;
 
-#if KMALLOC_MIN_SIZE <= 64
-       if (size > 64 && size <= 96)
+       if (KMALLOC_MIN_SIZE <= 32 && size > 64 && size <= 96)
                return 1;
-       if (size > 128 && size <= 192)
+       if (KMALLOC_MIN_SIZE <= 64 && size > 128 && size <= 192)
                return 2;
-#endif
        if (size <=          8) return 3;
        if (size <=         16) return 4;
        if (size <=         32) return 5;