* [LTP] [PATCH] checkpatch: relax parenthesis style checks
@ 2026-07-14 8:32 Andrea Cervesato
2026-07-14 8:50 ` Cyril Hrubis
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andrea Cervesato @ 2026-07-14 8:32 UTC (permalink / raw)
To: Linux Test Project
From: Andrea Cervesato <andrea.cervesato@suse.com>
The PARENTHESIS_ALIGNMENT and OPEN_ENDED_LINE strict checks flag common
LTP formatting that is otherwise accepted, so disable them.
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
.checkpatch.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.checkpatch.conf b/.checkpatch.conf
index a7b6219adac5fff663c99a4cafaafb7c609233a6..0b22f7811cc891e91c62565edb0663df1e0f2622 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -17,3 +17,6 @@
# ENOSYS is used in test error macros
--ignore ENOSYS
+
+# LTP does not enforce open parenthesis alignment nor forbid a trailing '('
+--ignore PARENTHESIS_ALIGNMENT,OPEN_ENDED_LINE
---
base-commit: 7ca5dc366a558f3666223e6abe579edd90bafd38
change-id: 20260714-checkpatch_remove_rules-e942ef47a23d
Best regards,
--
Andrea Cervesato <andrea.cervesato@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH] checkpatch: relax parenthesis style checks
2026-07-14 8:32 [LTP] [PATCH] checkpatch: relax parenthesis style checks Andrea Cervesato
@ 2026-07-14 8:50 ` Cyril Hrubis
2026-07-22 6:32 ` Petr Vorel
2026-07-14 10:47 ` [LTP] " linuxtestproject.agent
2026-07-21 15:22 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2026-07-14 8:50 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: Linux Test Project
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] checkpatch: relax parenthesis style checks
2026-07-14 8:32 [LTP] [PATCH] checkpatch: relax parenthesis style checks Andrea Cervesato
2026-07-14 8:50 ` Cyril Hrubis
@ 2026-07-14 10:47 ` linuxtestproject.agent
2026-07-21 15:22 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2 siblings, 0 replies; 5+ messages in thread
From: linuxtestproject.agent @ 2026-07-14 10:47 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi Andrea,
On Tue, Jul 14 2026, Andrea Cervesato wrote:
> checkpatch: relax parenthesis style checks
Verdict - Reviewed
---
Note:
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] 5+ messages in thread
* Re: [LTP] [PATCH] checkpatch: relax parenthesis style checks
2026-07-14 8:32 [LTP] [PATCH] checkpatch: relax parenthesis style checks Andrea Cervesato
2026-07-14 8:50 ` Cyril Hrubis
2026-07-14 10:47 ` [LTP] " linuxtestproject.agent
@ 2026-07-21 15:22 ` Andrea Cervesato via ltp
2 siblings, 0 replies; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-07-21 15:22 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: Linux Test Project
Merged, Thanks!
--
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] 5+ messages in thread
* Re: [LTP] [PATCH] checkpatch: relax parenthesis style checks
2026-07-14 8:50 ` Cyril Hrubis
@ 2026-07-22 6:32 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2026-07-22 6:32 UTC (permalink / raw)
To: Andrea Cervesato, Cyril Hrubis; +Cc: Linux Test Project
Hi Andrea, Cyril,
I found both rules useful (more readable and more consistent code). Can we put
it back? Over the years you will recognise on the code of single test that it
was written/modified by several people with a different styles. And that makes
it less readable.
* PARENTHESIS_ALIGNMENT check enforces space behind 'while' or 'if'.
i.e. instead of:
while(tst_fzsync_run_b(&fzsync_pair)) {
have:
while (tst_fzsync_run_b(&fzsync_pair)) {
cve-2014-0196.c mixes 'while()' and 'while ()'. Is it that hard to be
consistent on it?
* OPEN_ENDED_LINE asks for not ending line with '(' or '['.
i.e. instead of this:
ruleset_fd = TST_EXP_FD_SILENT(
tst_syscall(__NR_landlock_create_ruleset, ruleset_attr,
sizeof(struct tst_landlock_ruleset_attr_abi1), 0));
have this:
ruleset_fd = TST_EXP_FD_SILENT(tst_syscall(__NR_landlock_create_ruleset, ruleset_attr,
sizeof(struct tst_landlock_ruleset_attr_abi1), 0));
It's just my personal preference but I agree with the author of the rule that
enforced style is more readable.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-22 6:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 8:32 [LTP] [PATCH] checkpatch: relax parenthesis style checks Andrea Cervesato
2026-07-14 8:50 ` Cyril Hrubis
2026-07-22 6:32 ` Petr Vorel
2026-07-14 10:47 ` [LTP] " linuxtestproject.agent
2026-07-21 15:22 ` [LTP] [PATCH] " Andrea Cervesato via ltp
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.