aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2014-08-06 19:04:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:14 -0400
commit5e804789673114c616816f8387169790afe376b5 (patch)
treeb97e24133addcc22773e6aaee61d3a0cabc1695b
parenta640616822b2c3a8009b0600f20c4a76ea8a0025 (diff)
slab: change int to size_t for representing allocation size
It is better to represent allocation size in size_t rather than int. So change it. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Lameter <cl@linux.com> Reviewed-by: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/slab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 42a9eddb61cd..1351725f7936 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -681,7 +681,7 @@ static void init_arraycache(struct array_cache *ac, int limit, int batch)
681static struct array_cache *alloc_arraycache(int node, int entries, 681static struct array_cache *alloc_arraycache(int node, int entries,
682 int batchcount, gfp_t gfp) 682 int batchcount, gfp_t gfp)
683{ 683{
684 int memsize = sizeof(void *) * entries + sizeof(struct array_cache); 684 size_t memsize = sizeof(void *) * entries + sizeof(struct array_cache);
685 struct array_cache *ac = NULL; 685 struct array_cache *ac = NULL;
686 686
687 ac = kmalloc_node(memsize, gfp, node); 687 ac = kmalloc_node(memsize, gfp, node);
@@ -868,7 +868,7 @@ static void *alternate_node_alloc(struct kmem_cache *, gfp_t);
868static struct alien_cache *__alloc_alien_cache(int node, int entries, 868static struct alien_cache *__alloc_alien_cache(int node, int entries,
869 int batch, gfp_t gfp) 869 int batch, gfp_t gfp)
870{ 870{
871 int memsize = sizeof(void *) * entries + sizeof(struct alien_cache); 871 size_t memsize = sizeof(void *) * entries + sizeof(struct alien_cache);
872 struct alien_cache *alc = NULL; 872 struct alien_cache *alc = NULL;
873 873
874 alc = kmalloc_node(memsize, gfp, node); 874 alc = kmalloc_node(memsize, gfp, node);
@@ -880,7 +880,7 @@ static struct alien_cache *__alloc_alien_cache(int node, int entries,
880static struct alien_cache **alloc_alien_cache(int node, int limit, gfp_t gfp) 880static struct alien_cache **alloc_alien_cache(int node, int limit, gfp_t gfp)
881{ 881{
882 struct alien_cache **alc_ptr; 882 struct alien_cache **alc_ptr;
883 int memsize = sizeof(void *) * nr_node_ids; 883 size_t memsize = sizeof(void *) * nr_node_ids;
884 int i; 884 int i;
885 885
886 if (limit > 1) 886 if (limit > 1)
@@ -1037,7 +1037,7 @@ static int init_cache_node_node(int node)
1037{ 1037{
1038 struct kmem_cache *cachep; 1038 struct kmem_cache *cachep;
1039 struct kmem_cache_node *n; 1039 struct kmem_cache_node *n;
1040 const int memsize = sizeof(struct kmem_cache_node); 1040 const size_t memsize = sizeof(struct kmem_cache_node);
1041 1041
1042 list_for_each_entry(cachep, &slab_caches, list) { 1042 list_for_each_entry(cachep, &slab_caches, list) {
1043 /* 1043 /*