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

From: Joe Perches

Date: Mon May 11 2026 - 19:25:42 EST


On Mon, 2026-05-11 at 23:57 +0200, Petr Vorel wrote:
> 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>
> > 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?

Hello Petr.

I suppose another check could be added.
There is function 'is_userspace' available.

I don't know if userspace cares at all about camelcase anyway.