From: Julia Lawall <julia.lawall@inria.fr>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: dmitry.torokhov@gmail.com, Julia.Lawall@inria.fr,
bentiss@kernel.org, cocci@inria.fr, corbet@lwn.net,
hadess@hadess.net, jikos@kernel.org, lains@riseup.net,
linux-doc@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, nicolas.palix@imag.fr,
skhan@linuxfoundation.org
Subject: re: HID: add documentation and Coccinelle script for FF registration race
Date: Tue, 18 Aug 2026 14:08:17 +0200 (CEST) [thread overview]
Message-ID: <2a757d6-c09d-c16c-43df-fe8fab3c1b2b@inria.fr> (raw)
In-Reply-To: <20260818120428.2546810-1-ribalda@chromium.org>
On Tue, 18 Aug 2026, Ricardo Ribalda wrote:
> Hi Dimitry
>
> Looks like media-ci is not particularly happy about this patch:
>
> https://gitlab.freedesktop.org/linux-media/users/ribalda/-/jobs/108127901
>
> /usr/bin/spatch -D report --no-show-diff --very-quiet --cocci-file /builds/linux-media/users/ribalda/scripts/coccinelle/hid/ff_race.cocci --patch /builds/linux-media/users/ribalda --dir . -I /builds/linux-media/users/ribalda/arch/x86/include -I /builds/linux-media/users/ribalda/arch/x86/include/generated -I /builds/linux-media/users/ribalda/include -I /builds/linux-media/users/ribalda/include -I /builds/linux-media/users/ribalda/arch/x86/include/uapi -I /builds/linux-media/users/ribalda/arch/x86/include/generated/uapi -I /builds/linux-media/users/ribalda/include/uapi -I /builds/linux-media/users/ribalda/include/generated/uapi --include /builds/linux-media/users/ribalda/include/linux/compiler-version.h --include /builds/linux-media/users/ribalda/include/linux/kconfig.h --jobs 16 --chunksize 1
> Position variable r.p2 on line 20 must be attached to some other token using @.
> coccicheck failed
>
>
> The following change fixes the issue for me... but you probably want to double
> check it, I am not proficient at cocci.
I would also like to improve this, as suggested in a previous mail.
Could it be detached from the documentation change? Then I can take this
part and fix it up.
julia
>
> diff --git a/scripts/coccinelle/hid/ff_race.cocci b/scripts/coccinelle/hid/ff_race.cocci
> index 479f5d1e3184..7cf84936db13 100644
> --- a/scripts/coccinelle/hid/ff_race.cocci
> +++ b/scripts/coccinelle/hid/ff_race.cocci
> @@ -9,7 +9,8 @@ virtual report
>
> @r@
> identifier probe_fn;
> -expression hdev, flags;
> +identifier hdev;
> +expression flags;
> position p1, p2;
> @@
>
> @@ -17,7 +18,7 @@ probe_fn(struct hid_device *hdev, ...) {
> <...
> hid_hw_start@p1(hdev, flags)
> ...
> - \(input_ff_create\|input_ff_create_memless\)@p2(...)
> + \(input_ff_create@p2\|input_ff_create_memless@p2\)(...)
> ...>
> }
>
>
> Regards!
>
next prev parent reply other threads:[~2026-08-18 12:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 18:46 [PATCH 00/21] HID: fix racy force feedback initialization via .input_configured() Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 01/21] HID: core: automatically initialize generic FF if no other FF is present Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 02/21] HID: add documentation and Coccinelle script for FF registration race Dmitry Torokhov
2026-08-16 18:52 ` Julia Lawall
2026-08-17 4:03 ` Dmitry Torokhov
2026-08-18 12:04 ` Ricardo Ribalda
2026-08-18 12:08 ` Julia Lawall [this message]
2026-08-27 9:45 ` Ricardo Ribalda
2026-08-03 18:46 ` [PATCH 03/21] HID: axff: move FF initialization to .input_configured() Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 04/21] HID: betop: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 05/21] HID: bigben: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 06/21] HID: dragonrise: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 07/21] HID: emsff: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 08/21] HID: gaff: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 09/21] HID: stadia: use open/close to manage workqueue lifecycle Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 10/21] HID: stadia: move FF initialization to .input_configured() Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 11/21] HID: holtek: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 12/21] HID: move generic FF initialization into hidinput_connect() Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 13/21] HID: microsoft: move FF initialization to .input_configured() Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 14/21] HID: pantherlord: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 15/21] HID: thrustmaster: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 16/21] HID: zeroplus: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 17/21] HID: mayflash: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 18/21] HID: smartjoyplus: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 19/21] HID: megaworld: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 20/21] HID: logitech-hidpp: " Dmitry Torokhov
2026-08-03 18:46 ` [PATCH 21/21] HID: haptic: move FF initialization into .input_configured() Dmitry Torokhov
2026-08-14 12:47 ` [PATCH 00/21] HID: fix racy force feedback initialization via .input_configured() Jiri Kosina
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=2a757d6-c09d-c16c-43df-fe8fab3c1b2b@inria.fr \
--to=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