x86, cleanups: Use clear_page/copy_page rather than memset/memcpy
When operating on whole pages, use clear_page() and copy_page() in favor of memset() and memcpy(); after all that's what they are intended for. Signed-off-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <4C7FB8CA0200007800013F51@vpn.id2.novell.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
0f1cf415f0
commit
234bb549ee
@@ -67,7 +67,7 @@ static __init void *alloc_low_page(void)
|
||||
panic("alloc_low_page: ran out of memory");
|
||||
|
||||
adr = __va(pfn * PAGE_SIZE);
|
||||
memset(adr, 0, PAGE_SIZE);
|
||||
clear_page(adr);
|
||||
return adr;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ char swsusp_pg_dir[PAGE_SIZE]
|
||||
|
||||
static inline void save_pg_dir(void)
|
||||
{
|
||||
memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
|
||||
copy_page(swsusp_pg_dir, swapper_pg_dir);
|
||||
}
|
||||
#else /* !CONFIG_ACPI_SLEEP */
|
||||
static inline void save_pg_dir(void)
|
||||
|
||||
Reference in New Issue
Block a user