Since the name of kmalloc can be obtained from kmalloc_info[], remove the kmalloc_cache_name() that is no longer used. Signed-off-by: Pengfei Li <lpf.vector@xxxxxxxxx> --- mm/slab_common.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index 7bd88cc09987..002e16673581 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1191,21 +1191,6 @@ void __init setup_kmalloc_cache_index_table(void) } } -static const char * -kmalloc_cache_name(const char *prefix, unsigned int size) -{ - - static const char units[3] = "\0kM"; - int idx = 0; - - while (size >= 1024 && (size % 1024 == 0)) { - size /= 1024; - idx++; - } - - return kasprintf(GFP_NOWAIT, "%s-%u%c", prefix, size, units[idx]); -} - static void __init new_kmalloc_cache(int idx, int type, slab_flags_t flags) { -- 2.21.0