From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <Julia.Lawall@inria.fr>,
Ricardo Ribalda <ribalda@chromium.org>,
cocci@inria.fr, linux-input@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org, "Bastien Nocera" <hadess@hadess.net>,
"Benjamin Tissoires" <bentiss@kernel.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Filipe Laíns" <lains@riseup.net>,
"Jiri Kosina" <jikos@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Nicolas Palix" <nicolas.palix@imag.fr>,
"Shuah Khan" <skhan@linuxfoundation.org>
Subject: Re: [cocci] [PATCH] HID: fix semantic patch and improve its performance
Date: Thu, 27 Aug 2026 13:51:01 +0200 [thread overview]
Message-ID: <eaca9bae-fba2-4824-9219-faad0b9f766e@web.de> (raw)
In-Reply-To: <20260827112949.2431233-1-Julia.Lawall@inria.fr>
> Replace "expression" with "identifier" in the declaration of hdev.
> This is necessary because hdev is used as the name of a function
> parameter.
…
> +++ b/scripts/coccinelle/hid/ff_race.cocci
…
> -@r@
> +@r exists@
> identifier probe_fn;
> -expression hdev, flags;
> +identifier hdev;
May the following SmPL code variant be applied?
identifier hdev, probe_fn;
> +expression flags;
> position p1, p2;
> @@
>
> probe_fn(struct hid_device *hdev, ...) {
> - <...
> + ... when any
> hid_hw_start@p1(hdev, flags)
> ...
> - \(input_ff_create\|input_ff_create_memless\)@p2(...)
> - ...>
> + \(input_ff_create@p2\|input_ff_create_memless@p2\)(...)
How do you think about to use the following SmPL code variation?
(input_ff_create@p2
|input_ff_create_memless@p2
)(...)
> + ... when any
> }
>
> @script:python depends on report@
Regards,
Markus
next prev parent reply other threads:[~2026-08-27 11:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 11:29 [PATCH] HID: fix semantic patch and improve its performance Julia Lawall
2026-08-27 11:51 ` Markus Elfring [this message]
2026-08-27 12:00 ` [cocci] " Julia Lawall
2026-08-27 12:08 ` Markus Elfring
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=eaca9bae-fba2-4824-9219-faad0b9f766e@web.de \
--to=markus.elfring@web.de \
--cc=Julia.Lawall@inria.fr \
--cc=bentiss@kernel.org \
--cc=cocci@inria.fr \
--cc=corbet@lwn.net \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=jikos@kernel.org \
--cc=lains@riseup.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.palix@imag.fr \
--cc=ribalda@chromium.org \
--cc=skhan@linuxfoundation.org \
/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