Linux Input/HID development
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: "Ricardo Ribalda" <ribalda@chromium.org>,
	cocci@inria.fr, linux-input@vger.kernel.org,
	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:00:00 +0200 (CEST)	[thread overview]
Message-ID: <ec917c17-dcee-bbed-b59f-49e3cde23cc@inria.fr> (raw)
In-Reply-To: <eaca9bae-fba2-4824-9219-faad0b9f766e@web.de>

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]



On Thu, 27 Aug 2026, Markus Elfring wrote:

> > 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;

Yes, but it doesn't matter.

>
>
> > +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.

julia

>
>
> > +  ... when any
> >  }
> >
> >  @script:python depends on report@
>
> Regards,
> Markus
>

  reply	other threads:[~2026-08-27 12:00 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 [this message]
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=ec917c17-dcee-bbed-b59f-49e3cde23cc@inria.fr \
    --to=julia.lawall@inria.fr \
    --cc=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=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