]> git.baikalelectronics.ru Git - kernel.git/commit
compiler-types.h: Include naked type in __pick_integer_type() match
authorWill Deacon <will@kernel.org>
Fri, 5 Jun 2020 10:05:51 +0000 (11:05 +0100)
committerWill Deacon <will@kernel.org>
Fri, 5 Jun 2020 10:05:51 +0000 (11:05 +0100)
commitf31e72e9808f38833d861652fa302af7ad080cd6
tree0896623792afb87c5e947bee4dc59f780513f550
parentd7d7066e63a8b78aad80f69ef5960574497b6d56
compiler-types.h: Include naked type in __pick_integer_type() match

__pick_integer_type() checks whether the type of its first argument is
compatible with an explicitly signed or unsigned integer type, returning
the compatible type if it exists.

Unfortunately, 'char' is neither compatible with 'signed char' nor
'unsigned char', so add a check against the naked type to allow the
__unqual_scalar_typeof() macro to strip qualifiers from char types
without an explicit signedness.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Will Deacon <will@kernel.org>
include/linux/compiler_types.h