Re: [PATCH] gpiolib: acpi: use correct format characters

From: Linus Torvalds
Date: Fri Mar 18 2022 - 14:37:59 EST


On Fri, Mar 18, 2022 at 11:01 AM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> Maybe we should reconsider our recommendations for signed types?

For 'hhx' is probably does make sense in some cases.

That said, for kernel work, if you work on byte values, I would
seriously suggest not using 'char' at all, which has badly defined
sign.

And 'signed char' makes no sense either.

So while 'hhx' makes sense in the general case, for kernel work I'd
much rather see "don't use stupid types".

So why not just use 'unsigned char' (or 'u8' if you think typing is boring).

Linus