linux/arch/powerpc
Anton Blanchard e00d93ac9a powerpc: Fix duplicate const clang warning in user access code
This re-applies commit b91c1e3e7a ("powerpc: Fix duplicate const
clang warning in user access code") (Jun 2015) which was undone in
commits:
  f2ca809059 ("powerpc/sparse: Constify the address pointer in __get_user_nosleep()") (Feb 2017)
  d466f6c5ca ("powerpc/sparse: Constify the address pointer in __get_user_nocheck()") (Feb 2017)
  f84ed59a61 ("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 <anton@samba.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-09-19 22:08:12 +10:00
..
boot powerpc/boot: Ensure _zimage_start is a weak symbol 2018-09-19 22:08:12 +10:00
configs powerpc/configs: Update skiroot defconfig 2018-09-19 22:08:12 +10:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include powerpc: Fix duplicate const clang warning in user access code 2018-09-19 22:08:12 +10:00
kernel powerpc/pseries: Disable CPU hotplug across migrations 2018-09-19 22:08:12 +10:00
kvm PPC KVM fixes for 4.19 2018-09-04 21:12:46 +02:00
lib powerpc/64: Remove static branch hints from memset() 2018-09-17 21:17:25 +10:00
math-emu
mm powerpc/64s/hash: Add a SLB preload cache 2018-09-19 22:01:56 +10:00
net powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
oprofile treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
perf powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
platforms powerpc/pseries: Remove unneeded uses of dlpar work queue 2018-09-19 22:08:12 +10:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev powerpc/xive: Use xive_cpu->chip_id instead of looking it up again 2018-09-19 21:58:09 +10:00
tools powerpc: Add a checkpatch wrapper with our preferred settings 2018-08-07 21:49:25 +10:00
xmon powerpc: consolidate -mno-sched-epilog into FTRACE flags 2018-09-19 22:01:56 +10:00
Kconfig powerpc: disable support for relative ksymtab references 2018-08-29 16:12:07 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer 2018-09-19 22:01:56 +10:00
Makefile.postlink