Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rong Zhang" <i@rong.moe>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v7 01/13] HID: haptic: Get rid of input_ff_destroy() in error paths
Date: Sat, 05 Dec 2026 18:58:11 +0000	[thread overview]
Message-ID: <sashiko-outbox-251834@kernel.org> (raw)
In-Reply-To: <20261206-hid-haptic-kmod-v7-1-3eea47035836@rong.moe>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] HID: haptic: commit message inaccurately claims driver cannot
  build as module
--

commit 2ef7c6fa04e1a243f8d5cc147ccdc1f44d78bf30
Author: Rong Zhang <i@rong.moe>

HID: haptic: Get rid of input_ff_destroy() in error paths

This commit drops the get_device()/put_device() and
try_module_get()/module_put() calls in hid_haptic_init() and
hid_haptic_destroy(), removing the error paths after input_ff_create() and
the input_ff_destroy() rollback.

Link: https://msgid.link/f44447354f28c295e79a025bbcab7a4e@gmail.com

> Due to the driver being unable to build as a module since commit
> 083a4f3f3cc7 ("HID: Kconfig: Fix build error from CONFIG_HID_HAPTIC"),
> try_module_get()/module_put() is needless, too.

[Severity: Low]
Is this rationale accurate for CONFIG_HID=m?

Commit 083a4f3f3cc7 ("HID: Kconfig: Fix build error from CONFIG_HID_HAPTIC")
only changed CONFIG_HID_HAPTIC to bool.  CONFIG_HID is still tristate and
drivers/hid/Makefile links hid-haptic.o into hid.o, so with CONFIG_HID=m and
CONFIG_HID_HAPTIC=y, hid-haptic is still part of the loadable hid.ko module.

Removing try_module_get()/module_put() is safe because commit 2ae35f090d02
("Input: destroy force-feedback device on input unregistration") destroys the
FF device on unregistration while hid.ko is still pinned.  With Cc: stable,
attributing both removals to that commit makes the backport dependency clear.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261206-hid-haptic-kmod-v7-0-3eea47035836@rong.moe?part=1

  reply	other threads:[~2026-12-05 18:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 18:41 [PATCH v7 00/13] HID: Add hid-plugin framework & convert hid-haptic into a generic plugin Rong Zhang
2026-12-05 18:41 ` [PATCH v7 01/13] HID: haptic: Get rid of input_ff_destroy() in error paths Rong Zhang
2026-12-05 18:58   ` sashiko-bot [this message]
2026-12-05 19:24     ` Rong Zhang
2026-12-05 18:41 ` [PATCH v7 02/13] HID: haptic: Fix use-after-free when draining workqueue Rong Zhang
2026-12-05 18:41 ` [PATCH v7 03/13] HID: haptic, multitouch: Check haptic prerequisite properly Rong Zhang
2026-12-05 19:03   ` sashiko-bot
2026-12-05 19:26     ` Rong Zhang
2026-12-05 18:41 ` [PATCH v7 04/13] HID: haptic: Postpone GET_REPORT to init Rong Zhang
2026-12-05 19:02   ` sashiko-bot
2026-12-05 19:55     ` Rong Zhang
2026-12-05 18:41 ` [PATCH v7 05/13] HID: Add hid-plugin framework for loadable plugin modules Rong Zhang
2026-12-05 19:12   ` sashiko-bot
2026-12-05 18:41 ` [PATCH v7 06/13] HID: haptic: Convert to a loadable plugin module Rong Zhang
2026-12-05 19:11   ` sashiko-bot
2026-12-05 18:41 ` [PATCH v7 07/13] HID: haptic: Adopt pr_fmt, dev_fmt and hid_*() printk helpers Rong Zhang
2026-12-05 18:41 ` [PATCH v7 08/13] HID: Add Ordinal page defines Rong Zhang
2026-12-05 18:41 ` [PATCH v7 09/13] HID: haptic: Handle list reports separately and make auto trigger optional Rong Zhang
2026-12-05 18:41 ` [PATCH v7 10/13] HID: haptic: Decouple from hid-multitouch and support other devices Rong Zhang
2026-12-05 19:08   ` sashiko-bot
2026-12-05 18:42 ` [PATCH v7 11/13] HID: haptic: Add quirk table Rong Zhang
2026-12-05 18:42 ` [PATCH v7 12/13] HID: haptic: Add HID_HAPTIC_QUIRK_NO_RETRIGGER to disable retriggering Rong Zhang
2026-12-05 18:42 ` [PATCH v7 13/13] HID: haptic: Add quirk flag for Logitech MX Master 4 Rong Zhang

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=sashiko-outbox-251834@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=i@rong.moe \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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