From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Subject: Re: [cocci] Reconsidering condition check repetitions with help of SmPL?
Date: Wed, 8 Oct 2025 15:31:06 +0200 [thread overview]
Message-ID: <cb341887-c74c-4ba3-a8ee-7d83b6910e57@web.de> (raw)
In-Reply-To: <36f32079-1045-4913-9fff-3d1110b153c7@web.de>
> Thus I tried the following SmPL script variant out.
Another SmPL script example for further development considerations:
// See also:
// smb2_compound_op()
// https://elixir.bootlin.com/linux/v6.17.1/source/fs/smb/client/smb2inode.c#L697-L748
@display@
expression e;
statement is, is2, es, es2;
@@
*if (e && ...)
is
else
es
<+... when != e
*if (e)
is2
else
es2
...+>
It looks promising on the first glance.
Markus_Elfring@Sonne:…/Projekte/Coccinelle/janitor> /usr/bin/spatch --parse-cocci show_questionable_condition_check_repetitions4.cocci
…
No grep query
Unfortunately, the software run time characteristics are evolving into undesirable directions
so far.
Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --no-loops fs/smb/client/smb2inode.c …/Projekte/Coccinelle/janitor/show_questionable_condition_check_repetitions4.cocci
…
timeout (we abort)
Fatal error: exception Coccinelle_modules.Common.Timeout
real 3m20,475s
user 3m20,006s
sys 0m0,331s
Regards,
Markus
prev parent reply other threads:[~2025-10-08 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 10:10 [cocci] Reconsidering condition check repetitions with help of SmPL? Markus Elfring
2025-10-08 11:50 ` Markus Elfring
2025-10-08 13:31 ` Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb341887-c74c-4ba3-a8ee-7d83b6910e57@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).