Files
android_kernel_xiaomi_sm8450/arch/arm/include/asm
Stefan Agner db4667a800 ARM: 8768/1: uaccess: remove const to avoid duplicate specifier
Some users of get_user use the macro with an argument p which
is already specified as static. When using clang this leads to
a duplicate specifier:
    CC      arch/arm/kernel/process.o
  In file included from init/do_mounts.c:15:
  In file included from ./include/linux/tty.h:7:
  In file included from ./include/uapi/linux/termios.h:6:
  In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1:
  ./include/asm-generic/termios.h:25:6: warning: duplicate 'const' declaration
          specifier [-Wduplicate-decl-specifier]
          if (get_user(tmp, &termio->c_iflag) < 0)
              ^
  ./arch/arm/include/asm/uaccess.h:195:3: note: expanded from macro 'get_user'
                  __get_user_check(x, p);
                  ^
  ./arch/arm/include/asm/uaccess.h:155:12: note: expanded from macro
          '__get_user_check'
                  register const typeof(*(p)) __user *__p asm("r0") = (p);

Remove the const attribute from the register declaration
to avoid the duplicate const specifier. In a test with ptrace.c
and traps.c (both using get_user with non-const arguments for p)
the generated code was exactly the same.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2018-05-19 11:53:46 +01:00
..
2018-02-06 18:32:44 -08:00
2018-04-11 10:28:39 -07:00
2017-11-15 18:21:04 -08:00
2017-06-05 17:50:44 +02:00
2015-05-28 15:31:53 +02:00
2018-05-19 11:53:46 +01:00
2018-01-21 15:37:56 +00:00
2017-11-13 01:34:49 +01:00
2016-10-19 10:18:47 +01:00
2018-05-19 11:53:46 +01:00