Re: [PATCH v4 0/3] checkpatch: userspace improvements
From: Petr Vorel
Date: Tue Sep 01 2026 - 02:21:15 EST
Hi Andrew,
> On Mon, 10 Aug 2026 18:45:49 +0200 Petr Vorel <pvorel@xxxxxxx> wrote:
> > Changes v3->v4:
> > * Change test for directory to be more more generic (Joe)
> > * Allow to use --no-userspace (sashiko)
> Sashiko had a few more questions?
> https://sashiko.dev/#/patchset/20260810164552.1049483-1-pvorel@xxxxxxx
Thanks for a reminder. All are about kernel code being wrongly considered as user space.
At the beginning I was not sure if we need --no-userspace at all, but we
probably do for non-kernel projects which pass --userspace permanently via
configuration file.
1) The original regex was suggested by Joe and should mostly work, but using /
is indeed safer.
-m@^arch/.*\btools\b@
+m@^arch/.*/tools/@
2) my $userspace = 0 will indeed prevent --no-userspace from working as an
override. I did not considered this as important, but let's fix that.
3) return ($userspace || path based detection: dtto
=> v5
Kind regards,
Petr