diff options
author | Anton Blanchard <[email protected]> | 2018-09-14 13:36:48 +0930 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2018-09-19 22:08:12 +1000 |
commit | e00d93ac9a189673028ac125a74b9bc8ae73eebc (patch) | |
tree | 1dd43f3063d20558ef750993492430f5c65e1e17 /arch/powerpc/include/asm/processor.h | |
parent | ee9d21b3b3583712029a0db65a4b7c081d08d3b3 (diff) |
powerpc: Fix duplicate const clang warning in user access code
This re-applies commit b91c1e3e7a6f ("powerpc: Fix duplicate const
clang warning in user access code") (Jun 2015) which was undone in
commits:
f2ca80905929 ("powerpc/sparse: Constify the address pointer in __get_user_nosleep()") (Feb 2017)
d466f6c5cac1 ("powerpc/sparse: Constify the address pointer in __get_user_nocheck()") (Feb 2017)
f84ed59a612d ("powerpc/sparse: Constify the address pointer in __get_user_check()") (Feb 2017)
We see a large number of duplicate const errors in the user access
code when building with llvm/clang:
include/linux/pagemap.h:576:8: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
ret = __get_user(c, uaddr);
The problem is we are doing const __typeof__(*(ptr)), which will hit
the warning if ptr is marked const.
Removing const does not seem to have any effect on GCC code
generation.
Signed-off-by: Anton Blanchard <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'arch/powerpc/include/asm/processor.h')
0 files changed, 0 insertions, 0 deletions