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 14:08:03 +0200 [thread overview]
Message-ID: <eb3d4b7d-23ca-4ef9-884c-9d10c4f0de17@web.de> (raw)
In-Reply-To: <ec917c17-dcee-bbed-b59f-49e3cde23cc@inria.fr>
>> …
>>> +++ 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;
>
> Yes, but it doesn't matter.
Can it occasionally matter to avoid the duplication of such an SmPL key word?
Can SmPL variable declarations become a bit shorter?
>>> +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
>> )(...)
>
> I find this completely unreadable.
I find this view surprising.
There are special views involved for the layout of such SmPL disjunctions.
Regards,
Markus
prev parent reply other threads:[~2026-08-27 12:09 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 ` [cocci] " Markus Elfring
2026-08-27 12:00 ` Julia Lawall
2026-08-27 12:08 ` 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=eb3d4b7d-23ca-4ef9-884c-9d10c4f0de17@web.de \
--to=markus.elfring@web.de \
--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=julia.lawall@inria.fr \
--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