diff options
author | Pengfei Li <lpf.vector@gmail.com> | 2019-11-30 17:49:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-01 06:29:17 -0800 |
commit | dc0a7f7558dd52e972408ebb535b0153c06d08c2 (patch) | |
tree | 70b8e456e1f4a23465417d054214b4bad5a727c6 /mm | |
parent | cb5d9fb38c3434ab6276bac500dfffe78649400b (diff) | |
download | linux-stable-dc0a7f7558dd52e972408ebb535b0153c06d08c2.tar.gz linux-stable-dc0a7f7558dd52e972408ebb535b0153c06d08c2.tar.bz2 linux-stable-dc0a7f7558dd52e972408ebb535b0153c06d08c2.zip |
mm, slab: remove unused kmalloc_size()
The size of kmalloc can be obtained from kmalloc_info[], so remove
kmalloc_size() that will not be used anymore.
Link: http://lkml.kernel.org/r/1569241648-26908-3-git-send-email-lpf.vector@gmail.com
Signed-off-by: Pengfei Li <lpf.vector@gmail.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Roman Gushchin <guro@fb.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 5 | ||||
-rw-r--r-- | mm/slab_common.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c index 66b3310b42b8..f1e1840af533 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1248,8 +1248,9 @@ void __init kmem_cache_init(void) */ kmalloc_caches[KMALLOC_NORMAL][INDEX_NODE] = create_kmalloc_cache( kmalloc_info[INDEX_NODE].name[KMALLOC_NORMAL], - kmalloc_size(INDEX_NODE), ARCH_KMALLOC_FLAGS, - 0, kmalloc_size(INDEX_NODE)); + kmalloc_info[INDEX_NODE].size, + ARCH_KMALLOC_FLAGS, 0, + kmalloc_info[INDEX_NODE].size); slab_state = PARTIAL_NODE; setup_kmalloc_cache_index_table(); diff --git a/mm/slab_common.c b/mm/slab_common.c index 68a8c294ca89..b67cbe464338 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1286,11 +1286,10 @@ void __init create_kmalloc_caches(slab_flags_t flags) struct kmem_cache *s = kmalloc_caches[KMALLOC_NORMAL][i]; if (s) { - unsigned int size = kmalloc_size(i); - kmalloc_caches[KMALLOC_DMA][i] = create_kmalloc_cache( kmalloc_info[i].name[KMALLOC_DMA], - size, SLAB_CACHE_DMA | flags, 0, 0); + kmalloc_info[i].size, + SLAB_CACHE_DMA | flags, 0, 0); } } #endif |