diff options
author | Orlando Arias <oarias@knights.ucf.edu> | 2017-05-16 21:34:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-17 21:07:46 +0200 |
commit | deba804c90642c8ed0f15ac1083663976d578f54 (patch) | |
tree | 90881a5181651c09e8fd8ceb9d62eb65bf556008 /arch/sparc/include/asm/pgtable_32.h | |
parent | sparc64: Fix mapping of 64k pages with MAP_FIXED (diff) | |
download | linux-deba804c90642c8ed0f15ac1083663976d578f54.tar.xz linux-deba804c90642c8ed0f15ac1083663976d578f54.zip |
sparc: Fix -Wstringop-overflow warning
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>
Diffstat (limited to 'arch/sparc/include/asm/pgtable_32.h')
-rw-r--r-- | arch/sparc/include/asm/pgtable_32.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index ce6f56980aef..cf190728360b 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h @@ -91,9 +91,9 @@ extern unsigned long pfn_base; * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. */ -extern unsigned long empty_zero_page; +extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; -#define ZERO_PAGE(vaddr) (virt_to_page(&empty_zero_page)) +#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) /* * In general all page table modifications should use the V8 atomic |