diff options
author | Orlando Arias <oarias@knights.ucf.edu> | 2017-05-16 19:34:00 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-07 10:07:46 (GMT) |
commit | 45ceb845ef34984357e6c2e0170570cc6f7179a3 (patch) | |
tree | 8224d89f0e8ed2f0cbd5421fc5cf9e0dd35c11d8 /arch/sparc/mm | |
parent | c1133c671a0467a8cc2fc79bdc34c764fb623043 (diff) | |
download | linux-45ceb845ef34984357e6c2e0170570cc6f7179a3.tar.xz |
sparc: Fix -Wstringop-overflow warning
[ Upstream commit deba804c90642c8ed0f15ac1083663976d578f54 ]
Greetings,
GCC 7 introduced the -Wstringop-overflow flag to detect buffer overflows
in calls to string handling functions [1][2]. Due to the way
``empty_zero_page'' is declared in arch/sparc/include/setup.h, this
causes a warning to trigger at compile time in the function mem_init(),
which is subsequently converted to an error. The ensuing patch fixes
this issue and aligns the declaration of empty_zero_page to that of
other architectures. Thank you.
Cheers,
Orlando.
[1] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02308.html
[2] https://gcc.gnu.org/gcc-7/changes.html
Signed-off-by: Orlando Arias <oarias@knights.ucf.edu>
--------------------------------------------------------------------------------
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/init_32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index eb82871..3b7092d 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -301,7 +301,7 @@ void __init mem_init(void) /* Saves us work later. */ - memset((void *)&empty_zero_page, 0, PAGE_SIZE); + memset((void *)empty_zero_page, 0, PAGE_SIZE); i = last_valid_pfn >> ((20 - PAGE_SHIFT) + 5); i += 1; |