mm/vmalloc.c: clean up map_vm_area third argument
authorWANG Chao <chaowang@redhat.com>
Wed, 6 Aug 2014 23:06:58 +0000 (16:06 -0700)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Fri, 31 Oct 2014 12:22:12 +0000 (12:22 +0000)
commita7887d668d35485301633fbd399299b2c51b4b4e
treebe424f8721599c2b96c91261074f7b0bc57296c9
parent490951acc7943501a3fd92559f14c574606c57ef
mm/vmalloc.c: clean up map_vm_area third argument

Currently map_vm_area() takes (struct page *** pages) as third argument,
and after mapping, it moves (*pages) to point to (*pages +
nr_mappped_pages).

It looks like this kind of increment is useless to its caller these
days.  The callers don't care about the increments and actually they're
trying to avoid this by passing another copy to map_vm_area().

The caller can always guarantee all the pages can be mapped into vm_area
as specified in first argument and the caller only cares about whether
map_vm_area() fails or not.

This patch cleans up the pointer movement in map_vm_area() and updates
its callers accordingly.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/tile/kernel/module.c
drivers/lguest/core.c
drivers/staging/android/binder.c
include/linux/vmalloc.h
mm/vmalloc.c
mm/zsmalloc.c