check_kernel_printf.c: check for signed char versus %02x issue
A common error is to pass a "char" or "signed char" to %02x (or
%.2X or some other variant). This can actually be a security
problem, because a lot of code expects this to produce exactly two
characters of output.
Unfortunately this also produces false positives, since we're
sometimes in arch-specific code on an arch where char is always
unsigned. I think it would be better, even in those cases, to do an
explicit '& 0xff' or equivalently cast the argument to (u8), to help
readers and static checkers not worry and prevent copy-pasting from
introducing an actual bug (and gcc should be able to ignore the mask
if char is indeed unsigned), but evidently not all maintainers agree,
so we'll have to live with these.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>