*/
for (type = KMALLOC_NORMAL; type < NR_KMALLOC_TYPES; type++) {
/* Caches that are NOT of the two-to-the-power-of size. */
- if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[type][1])
+ if (KMALLOC_MIN_SIZE <= 32)
new_kmalloc_cache(1, type);
- if (KMALLOC_MIN_SIZE <= 64 && !kmalloc_caches[type][2])
+ if (KMALLOC_MIN_SIZE <= 64)
new_kmalloc_cache(2, type);
/* Caches that are of the two-to-the-power-of size. */
- for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
- if (!kmalloc_caches[type][i])
- new_kmalloc_cache(i, type);
- }
+ for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++)
+ new_kmalloc_cache(i, type);
}
#ifdef CONFIG_RANDOM_KMALLOC_CACHES
random_kmalloc_seed = get_random_u64();