]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/sparsemem: use PAGES_PER_SECTION to remove redundant nr_pages parameter
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Tue, 5 Nov 2013 05:55:38 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:38 +0000 (16:55 +1100)
commitf3e95fef0f0d08d625854eac788517d004edc794
tree112c4418b9e0290ffe593b6f67a4eb616525a83e
parent8abba253c15ea27d6fc0e515fd543acd30fd896c
mm/sparsemem: use PAGES_PER_SECTION to remove redundant nr_pages parameter

For below functions,

- sparse_add_one_section()
- kmalloc_section_memmap()
- __kmalloc_section_memmap()
- __kfree_section_memmap()

they are always invoked to operate on one memory section, so it is
redundant to always pass a nr_pages parameter, which is the page numbers
in one section.  So we can directly use predefined macro PAGES_PER_SECTION
instead of passing the parameter.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memory_hotplug.h
mm/memory_hotplug.c
mm/sparse.c