From: sashiko-bot@kernel.org
To: "Fenglin Wu" <fenglin.wu@oss.qualcomm.com>
Cc: robh@kernel.org, linux-input@vger.kernel.org,
devicetree@vger.kernel.org, dmitry.torokhov@gmail.com,
conor+dt@kernel.org
Subject: Re: [PATCH v6 2/2] input: misc: Add Qualcomm SPMI PMIC haptics driver
Date: Fri, 07 Aug 2026 06:39:41 +0000 [thread overview]
Message-ID: <20260807063942.818071F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260806-qcom-spmi-haptics-v6-2-19fcecd5204f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Haptic effect fails to stop if `stop_timeline` wraps around to exactly 0.
--
--- Patch [2]: [PATCH v6 2/2] input: misc: Add Qualcomm SPMI PMIC haptics driver ---
commit 21a083ab5b9214e43c2b8143306bc686c7af6e1b
Author: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
input: misc: Add Qualcomm SPMI PMIC haptics driver
This commit adds an initial driver for the Qualcomm PMIH0108 PMIC haptics
module. It supports DIRECT_PLAY and FIFO modes using the input
force-feedback framework.
> diff --git a/drivers/input/misc/qcom-spmi-haptics.c b/drivers/input/misc/qcom-spmi-haptics.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/input/misc/qcom-spmi-haptics.c
[ ... ]
> +static void haptics_stop_work(struct work_struct *work)
> +{
> + struct qcom_haptics *h = container_of(to_delayed_work(work),
> + struct qcom_haptics, stop_work);
> +
> + guard(mutex)(&h->play_lock);
> +
> + if (h->active_effect_id != -1 && h->stop_timeline &&
> + time_after_eq(jiffies, h->stop_timeline))
[Severity: Medium]
Will this skip stopping the haptic effect if jiffies wraps around such that
the calculated stop_timeline is exactly 0?
Since 0 is a valid jiffies value, checking stop_timeline for truthiness
can result in the motor continuing to vibrate indefinitely if this exact
wraparound value is hit.
> + haptics_stop(h, false);
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260806-qcom-spmi-haptics-v6-0-19fcecd5204f@oss.qualcomm.com?part=2
prev parent reply other threads:[~2026-08-07 6:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 6:21 [PATCH v6 0/2] input: misc: Add an initial driver for haptics inside Qcom PMIH010x PMIC Fenglin Wu
2026-08-07 6:21 ` [PATCH v6 1/2] dt-bindings: input: Add Qualcomm SPMI PMIC haptics Fenglin Wu
2026-08-07 6:29 ` sashiko-bot
2026-08-07 15:56 ` Rob Herring
2026-08-07 6:21 ` [PATCH v6 2/2] input: misc: Add Qualcomm SPMI PMIC haptics driver Fenglin Wu
2026-08-07 6:39 ` sashiko-bot [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=20260807063942.818071F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=fenglin.wu@oss.qualcomm.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@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