Skip to contentSkip to conversation

__init in mm/slab.c

PATCH New Andries Brouwer 1 participant 1 message Nov 14, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 __init in mm/slab.c

The below removes an __initdata
(for initarray_generic that is referenced in non-init code).

include/linux/slab.h +2 -1
diff -uprN -X /linux/dontdiff a/include/linux/slab.h b/include/linux/slab.h
@@ -13,6 +13,7 @@ typedef struct kmem_cache_s kmem_cache_t
 
 #include	<linux/config.h>	/* kmalloc_sizes.h needs CONFIG_ options */
 #include	<linux/gfp.h>
+#include	<linux/init.h>
 #include	<linux/types.h>
 #include	<asm/page.h>		/* kmalloc_sizes.h needs PAGE_SIZE */
 #include	<asm/cache.h>		/* kmalloc_sizes.h needs L1_CACHE_BYTES */
@@ -53,7 +54,7 @@ typedef struct kmem_cache_s kmem_cache_t
 #define	SLAB_CTOR_VERIFY	0x004UL		/* tell constructor it's a verify call */
 
 /* prototypes */
-extern void kmem_cache_init(void);
+extern void __init kmem_cache_init(void);
 
 extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
 				       void (*)(void *, kmem_cache_t *, unsigned long),
mm/slab.c +1 -1
diff -uprN -X /linux/dontdiff a/mm/slab.c b/mm/slab.c
@@ -506,7 +506,7 @@ static struct cache_names __initdata cac
 
 static struct arraycache_init initarray_cache __initdata =
 	{ { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} };
-static struct arraycache_init initarray_generic __initdata =
+static struct arraycache_init initarray_generic =
 	{ { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} };
 
 /* internal cache of cache description objs */