Re: [PATCH 1/1] checkpatch: Ignore <inttypes.h> format macros

From: Petr Vorel

Date: Mon May 11 2026 - 17:58:14 EST


> On Mon, 2026-05-11 at 14:12 +0200, Petr Vorel wrote:
> > ```
> > Constants from <inttypes.h> are used only in userspace tools, they are
> > from ISO C99, let's don't report it:

> > arch/mips/boot/tools/relocs.c:572: CHECK: Avoid CamelCase: <PRIx32>
> > arch/s390/tools/relocs.c:52: CHECK: Avoid CamelCase: <PRIu64>
> > tools/testing/selftests/mm/vm_util.c:244: CHECK: Avoid CamelCase: <SCNu64>

> > Signed-off-by: Petr Vorel <[pvorel@xxxxxxx](mailto:pvorel@xxxxxxx)>

> Nack. This is userspace only and should be tested as such.

Thanks for info.

Yes, warning is correct for kernel space code. Do I understand correctly that
false positives are ok for user space code in the Linux kernel tree?

Or is it just because checkpatch.pl has no idea which sources are for user
space?

Kind regards,
Petr
...