mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
memory-hotplug: remove redundant call of page_to_pfn
This is just a small optimization. The start_pfn can be obtained directly by phys_index << PFN_SECTION_SHIFT. So the call of page_to_pfn() is redundant and remove it. Signed-off-by: Zhang Zhen <[email protected]> Acked-by: Yasuaki Ishimatsu <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Wang Nan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
committed by
Linus Torvalds
parent
9dc00f4c4f
commit
71fbd556ad
@@ -228,8 +228,8 @@ memory_block_action(unsigned long phys_index, unsigned long action, int online_t
|
||||
struct page *first_page;
|
||||
int ret;
|
||||
|
||||
first_page = pfn_to_page(phys_index << PFN_SECTION_SHIFT);
|
||||
start_pfn = page_to_pfn(first_page);
|
||||
start_pfn = phys_index << PFN_SECTION_SHIFT;
|
||||
first_page = pfn_to_page(start_pfn);
|
||||
|
||||
switch (action) {
|
||||
case MEM_ONLINE:
|
||||
|
||||
Reference in New Issue
Block a user