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)
commit8d4beed7bbc71666de2630b79899c8852c3bf5cd
tree0896623792afb87c5e947bee4dc59f780513f550
parent5872f1a2e5c783783d51e96468f0ff6aede61182
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