]> git.baikalelectronics.ru Git - kernel.git/commit
asm-generic: uaccess: 1-byte access is always aligned
authorArnd Bergmann <arnd@arndb.de>
Sat, 8 May 2021 12:58:46 +0000 (14:58 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 17 May 2021 11:30:29 +0000 (13:30 +0200)
commit2aa1d0a17869cdaea22d3a0ef4155fe6f0b9dd5e
tree7fd08bd16e79ad48d570327454d6ee36c8be40c8
parent1b5499cf8994c7ee657c448fb6e9cd284a247713
asm-generic: uaccess: 1-byte access is always aligned

With the cleaned up version of asm-generic/unaligned.h,
there is a warning about the get_user/put_user helpers using
unaligned access for single-byte variables:

include/asm-generic/uaccess.h: In function ‘__get_user_fn’:
include/asm-generic/unaligned.h:13:15: warning: ‘packed’ attribute ignored for field of type ‘u8’ {aka ‘unsigned char’} [-Wattributes]
  const struct { type x __packed; } *__pptr = (typeof(__pptr))(ptr); \

Change these to use a direct pointer dereference to avoid the
warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/uaccess.h