All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] checkpatch: Pass git root
@ 2026-05-13 13:49 Petr Vorel
  2026-05-13 16:22 ` [LTP] " linuxtestproject.agent
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2026-05-13 13:49 UTC (permalink / raw)
  To: ltp

checkpatch.pl --strict parameter added in 1908cd77c2 expects --root
parameter when running with --no-tree due searching in $root/include/
directory.

This fixes warning on files with CAMELCASE check (corner case):

    $ cd testcases/kernel/syscalls/statx; make check-statx02
    CHECK testcases/kernel/syscalls/statx/statx02.c
    Use of uninitialized value $root in concatenation (.) or string at
    scripts/checkpatch.pl line 1213.
    find: ‘/include’: No such file or directory
    statx02.c:52: CHECK: Avoid CamelCase: <PRIu64>
    ...

Fixes: 1908cd77c2 ("make check: b4: Use --strict when run checkpatch.pl")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
NOTE: I'll verify the usage with kernel checkpatch.pl maintainers.

Kind regards,
Petr

 include/mk/env_post.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index 1b0d3a2a8e..726b9a9e75 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -73,7 +73,7 @@ CHECK_TARGETS			?= $(addprefix check-,$(notdir $(patsubst %.c,%,$(sort $(wildcar
 CHECK_TARGETS			:= $(filter-out $(addprefix check-, $(FILTER_OUT_MAKE_TARGETS)), $(CHECK_TARGETS))
 CHECK_HEADER_TARGETS		?= $(addprefix check-,$(notdir $(sort $(wildcard $(abs_srcdir)/*.h))))
 CHECK				?= $(abs_top_srcdir)/tools/sparse/sparse-ltp
-CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f
+CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f --root $(abs_top_srcdir)
 SHELL_CHECK			?= $(abs_top_srcdir)/scripts/checkbashisms.pl --force --extra
 SHELL_CHECK_TARGETS		?= $(addprefix check-,$(notdir $(sort $(wildcard $(abs_srcdir)/*.sh))))
 
-- 
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] checkpatch: Pass git root
  2026-05-13 13:49 [LTP] [PATCH 1/1] checkpatch: Pass git root Petr Vorel
@ 2026-05-13 16:22 ` linuxtestproject.agent
  2026-05-19  8:56   ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 4+ messages in thread
From: linuxtestproject.agent @ 2026-05-13 16:22 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp, LTP AI Reviewer

Hi Petr,

On Wed, 13 May 2026, Petr Vorel wrote:
> checkpatch: Pass git root

> -CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f
> +CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f  --root $(abs_top_srcdir)

Note: there is a double space between `-f` and `--root`; consider collapsing
to a single space for consistency.

Reviewed-by: LTP AI Reviewer <ltp-ai@noreply.github.com>

---
Note:

Our agent completed the review of the patch.

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] checkpatch: Pass git root
  2026-05-13 16:22 ` [LTP] " linuxtestproject.agent
@ 2026-05-19  8:56   ` Andrea Cervesato via ltp
  2026-05-27  7:37     ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-05-19  8:56 UTC (permalink / raw)
  To: linuxtestproject.agent; +Cc: ltp, LTP AI Reviewer

Hi Petr,

> Hi Petr,
> 
> On Wed, 13 May 2026, Petr Vorel wrote:
> > checkpatch: Pass git root
> 
> > -CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f
> > +CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f  --root $(abs_top_srcdir)
> 
> Note: there is a double space between `-f` and `--root`; consider collapsing
> to a single space for consistency.
> 

Can you please fix this before merging the patch?
Otherwise LGTM

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] checkpatch: Pass git root
  2026-05-19  8:56   ` Andrea Cervesato via ltp
@ 2026-05-27  7:37     ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2026-05-27  7:37 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: LTP AI Reviewer, ltp, linuxtestproject.agent

Hi Andrea,

> Hi Petr,

> > Hi Petr,

> > On Wed, 13 May 2026, Petr Vorel wrote:
> > > checkpatch: Pass git root

> > > -CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f
> > > +CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f  --root $(abs_top_srcdir)

The original patch is:

-CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f
+CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f --root $(abs_top_srcdir)

https://lists.linux.it/pipermail/ltp/2026-May/048397.html
https://lore.kernel.org/ltp/20260513134948.77923-1-pvorel@suse.cz/
https://patchwork.ozlabs.org/project/ltp/patch/20260513134948.77923-1-pvorel@suse.cz/

> > Note: there is a double space between `-f` and `--root`; consider collapsing
> > to a single space for consistency.


> Can you please fix this before merging the patch?

This is really funny. Interesting variant of hallucination. AI just added space
and pointed it out as my error.

Anyway, patch merged, no modification was needed. Thanks for your review.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-27  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 13:49 [LTP] [PATCH 1/1] checkpatch: Pass git root Petr Vorel
2026-05-13 16:22 ` [LTP] " linuxtestproject.agent
2026-05-19  8:56   ` Andrea Cervesato via ltp
2026-05-27  7:37     ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.