[PATCH v6 0/4] checkpatch: userspace improvements

Petr Vorel posted 4 patches 3 weeks ago
scripts/checkpatch.pl | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
[PATCH v6 0/4] checkpatch: userspace improvements
Posted by Petr Vorel 3 weeks ago
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@suse.cz/

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


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
Re: [PATCH v6 0/4] checkpatch: userspace improvements
Posted by Andrew Morton 2 weeks, 6 days ago
On Fri,  4 Sep 2026 13:02:26 +0200 Petr Vorel <pvorel@suse.cz> wrote:

> 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.

Thanks.  Let me put this into mm.git's mm-nonmm-unstable branch (and
hence into linux-next) for testing and additional review.

> Follow-up: 99b70ece33d8 ("checkpatch: suppress strscpy warnings for userspace tools")

Sorry, I'm not a fan of inventing new tags.  This isn't a documented
tag and nobody has ever used it before.  I altered these to

: This is a follow-up to 99b70ece33d8 ("checkpatch: suppress strscpy
: warnings for userspace tools").