[PATCH v6 0/4] checkpatch: userspace improvements

From: Petr Vorel

Date: Fri Sep 04 2026 - 07:42:26 EST


Few improvements for user space code + --userspace option for projects
which vendored checkpatch.pl.

There could be probably more checks which are kernel space only.

v6:
- Remove 4th commit "checkpatch: Factor out the check for UAPI files"
which added is_uapi(), which was wrong. I overlook that regex on BIT()
macro is different from the others, matching only ^include/uapi/.
- Fix 5th commit which wrongly called is_uapi() instead of
is_userspace().

Link to v5:
https://lore.kernel.org/lkml/20260901105642.851234-1-pvorel@xxxxxxx/

Link to v4:
https://lore.kernel.org/lkml/20260810164552.1049483-1-pvorel@xxxxxxx/


Petr Vorel (4):
checkpatch: Add more userspace directories to is_userspace()
checkpatch: Ignore <inttypes.h> format macros for userspace tools
checkpatch: Add --userspace to force userspace rules
checkpatch: Skip kernel specific checks for userspace

scripts/checkpatch.pl | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)

--
2.55.0