Commit 303cd693 authored by Chengming Zhou's avatar Chengming Zhou Committed by Vlastimil Babka

mm, slab: remove unused object_size parameter in kmem_cache_flags()

We don't use the object_size parameter in kmem_cache_flags(), so just
remove it.
Signed-off-by: default avatarChengming Zhou <chengming.zhou@linux.dev>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 66b3dc1f
...@@ -433,8 +433,7 @@ struct kmem_cache * ...@@ -433,8 +433,7 @@ struct kmem_cache *
__kmem_cache_alias(const char *name, unsigned int size, unsigned int align, __kmem_cache_alias(const char *name, unsigned int size, unsigned int align,
slab_flags_t flags, void (*ctor)(void *)); slab_flags_t flags, void (*ctor)(void *));
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(slab_flags_t flags, const char *name);
slab_flags_t flags, const char *name);
static inline bool is_kmalloc_cache(struct kmem_cache *s) static inline bool is_kmalloc_cache(struct kmem_cache *s)
{ {
......
...@@ -172,7 +172,7 @@ struct kmem_cache *find_mergeable(unsigned int size, unsigned int align, ...@@ -172,7 +172,7 @@ struct kmem_cache *find_mergeable(unsigned int size, unsigned int align,
size = ALIGN(size, sizeof(void *)); size = ALIGN(size, sizeof(void *));
align = calculate_alignment(flags, align, size); align = calculate_alignment(flags, align, size);
size = ALIGN(size, align); size = ALIGN(size, align);
flags = kmem_cache_flags(size, flags, name); flags = kmem_cache_flags(flags, name);
if (flags & SLAB_NEVER_MERGE) if (flags & SLAB_NEVER_MERGE)
return NULL; return NULL;
......
...@@ -1765,7 +1765,6 @@ __setup_param("slub_debug", slub_debug, setup_slub_debug, 0); ...@@ -1765,7 +1765,6 @@ __setup_param("slub_debug", slub_debug, setup_slub_debug, 0);
/* /*
* kmem_cache_flags - apply debugging options to the cache * kmem_cache_flags - apply debugging options to the cache
* @object_size: the size of an object without meta data
* @flags: flags to set * @flags: flags to set
* @name: name of the cache * @name: name of the cache
* *
...@@ -1774,8 +1773,7 @@ __setup_param("slub_debug", slub_debug, setup_slub_debug, 0); ...@@ -1774,8 +1773,7 @@ __setup_param("slub_debug", slub_debug, setup_slub_debug, 0);
* slab_debug=<Debug-Options>,<slab name1>,<slab name2> ... * slab_debug=<Debug-Options>,<slab name1>,<slab name2> ...
* then only the select slabs will receive the debug option(s). * then only the select slabs will receive the debug option(s).
*/ */
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(slab_flags_t flags, const char *name)
slab_flags_t flags, const char *name)
{ {
char *iter; char *iter;
size_t len; size_t len;
...@@ -1851,8 +1849,7 @@ static inline void add_full(struct kmem_cache *s, struct kmem_cache_node *n, ...@@ -1851,8 +1849,7 @@ static inline void add_full(struct kmem_cache *s, struct kmem_cache_node *n,
struct slab *slab) {} struct slab *slab) {}
static inline void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, static inline void remove_full(struct kmem_cache *s, struct kmem_cache_node *n,
struct slab *slab) {} struct slab *slab) {}
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(slab_flags_t flags, const char *name)
slab_flags_t flags, const char *name)
{ {
return flags; return flags;
} }
...@@ -5105,7 +5102,7 @@ static int calculate_sizes(struct kmem_cache *s) ...@@ -5105,7 +5102,7 @@ static int calculate_sizes(struct kmem_cache *s)
static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags) static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags)
{ {
s->flags = kmem_cache_flags(s->size, flags, s->name); s->flags = kmem_cache_flags(flags, s->name);
#ifdef CONFIG_SLAB_FREELIST_HARDENED #ifdef CONFIG_SLAB_FREELIST_HARDENED
s->random = get_random_long(); s->random = get_random_long();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment