Message ID | 20190903160430.1368-3-lpf.vector@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm, slab: Make kmalloc_info[] contain all types of names | expand |
On 9/3/19 6:04 PM, Pengfei Li wrote: > Since the name of kmalloc can be obtained from kmalloc_info[], > remove the kmalloc_cache_name() that is no longer used. That could simply be part of patch 1/5 really. > Signed-off-by: Pengfei Li <lpf.vector@gmail.com> Ack > --- > mm/slab_common.c | 15 --------------- > 1 file changed, 15 deletions(-)
On Mon, Sep 9, 2019 at 10:59 PM Vlastimil Babka <vbabka@suse.cz> wrote: > > On 9/3/19 6:04 PM, Pengfei Li wrote: > > Since the name of kmalloc can be obtained from kmalloc_info[], > > remove the kmalloc_cache_name() that is no longer used. > > That could simply be part of patch 1/5 really. > Ok, thanks. > > Signed-off-by: Pengfei Li <lpf.vector@gmail.com> > > Ack > > > --- > > 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) {
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@gmail.com> --- mm/slab_common.c | 15 --------------- 1 file changed, 15 deletions(-)