summaryrefslogtreecommitdiff
path: root/mm/slab.h
diff options
context:
space:
mode:
authorZheng Yejian <zhengyejian1@huawei.com>2024-01-30 09:41:07 +0800
committerVlastimil Babka <vbabka@suse.cz>2024-01-30 14:11:49 +0100
commit66b3dc1f04135f89384af39ec4e38546b82e1510 (patch)
treef31f24b72e27959acef76e21358a114ebfbe8a7a /mm/slab.h
parent98d3b6d98f8013d4e96f40d8d4b22d4da0d3f699 (diff)
mm/slub: remove parameter 'flags' in create_kmalloc_caches()
After commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"), parameter 'flags' is only passed as 0 in create_kmalloc_caches(), and then it is only passed to new_kmalloc_cache(). So we can change parameter 'flags' to be a local variable with initial value 0 in new_kmalloc_cache() and remove parameter 'flags' in create_kmalloc_caches(). Also make new_kmalloc_cache() static due to it is only used in mm/slab_common.c. Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/slab.h b/mm/slab.h
index f7df6d701c5b..9abec38be1d0 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -387,7 +387,7 @@ extern const struct kmalloc_info_struct {
/* Kmalloc array related functions */
void setup_kmalloc_cache_index_table(void);
-void create_kmalloc_caches(slab_flags_t);
+void create_kmalloc_caches(void);
extern u8 kmalloc_size_index[24];
@@ -422,8 +422,6 @@ gfp_t kmalloc_fix_flags(gfp_t flags);
int __kmem_cache_create(struct kmem_cache *, slab_flags_t flags);
void __init kmem_cache_init(void);
-void __init new_kmalloc_cache(int idx, enum kmalloc_cache_type type,
- slab_flags_t flags);
extern void create_boot_cache(struct kmem_cache *, const char *name,
unsigned int size, slab_flags_t flags,
unsigned int useroffset, unsigned int usersize);