From: sashiko-bot@kernel.org
To: "Pan Chuang" <panchuang@vivo.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH 4/4] HID: Intel-thc-hid: Intel-quickspi: Remove redundant dev_err()
Date: Mon, 13 Jul 2026 13:35:44 +0000 [thread overview]
Message-ID: <20260713133544.D7D2A1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260713132439.380121-5-panchuang@vivo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the driver double-decrements the runtime PM usage counter in quickspi_probe, leading to an underflow.
--
--- Patch [4]: [PATCH 4/4] HID: Intel-thc-hid: Intel-quickspi: Remove redundant dev_err() ---
commit 8f8bad90f3cb44d16834df11da9c79f13af5488d
Author: Pan Chuang <panchuang@vivo.com>
HID: Intel-thc-hid: Intel-quickspi: Remove redundant dev_err()
This commit removes a redundant dev_err() call after
devm_request_threaded_irq() in the quickspi_probe function, relying on the
core's built-in error logging to handle failures.
> diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
> index 4ae2e1718b30c..504ef3c842ab6 100644
> --- a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
> +++ b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
> @@ -636,11 +636,8 @@ static int quickspi_probe(struct pci_dev *pdev,
> quickspi_irq_thread_handler,
> IRQF_ONESHOT, KBUILD_MODNAME,
> qsdev);
> - if (ret) {
> - dev_err(&pdev->dev,
> - "Failed to request threaded IRQ, irq = %d.\n", pdev->irq);
> + if (ret)
> goto dev_deinit;
[Severity: High]
This problem wasn't introduced by this patch, but while reviewing
quickspi_probe(), I noticed the driver appears to double-decrement the
runtime PM usage counter later in the same function:
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c:quickspi_probe() {
...
/* Enable runtime power management */
pm_runtime_use_autosuspend(qsdev->dev);
pm_runtime_set_autosuspend_delay(qsdev->dev, DEFAULT_AUTO_SUSPEND_DELAY_MS);
pm_runtime_put_noidle(qsdev->dev);
pm_runtime_put_autosuspend(qsdev->dev);
...
}
Will this cause a PM runtime usage count underflow?
During device probe, the PCI core inherently takes a PM runtime reference.
Calling both pm_runtime_put_noidle() and pm_runtime_put_autosuspend() drops
two references while only one was acquired. This could potentially break
runtime power management for the device.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260713132439.380121-1-panchuang@vivo.com?part=4
next prev parent reply other threads:[~2026-07-13 13:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 13:24 [PATCH 0/4] HID: Remove redundant error messages on IRQ request failure Pan Chuang
2026-07-13 13:24 ` [PATCH 1/4] HID: amd_sfh: Remove redundant dev_err() Pan Chuang
2026-07-13 13:34 ` sashiko-bot
2026-07-13 13:24 ` [PATCH 2/4] HID: hid-goodix: " Pan Chuang
2026-07-13 13:24 ` [PATCH 3/4] HID: intel-ish-hid: ipc: " Pan Chuang
2026-07-13 13:43 ` sashiko-bot
2026-07-13 15:27 ` srinivas pandruvada
2026-07-13 16:08 ` Andy Shevchenko
2026-07-13 13:24 ` [PATCH 4/4] HID: Intel-thc-hid: Intel-quickspi: " Pan Chuang
2026-07-13 13:35 ` sashiko-bot [this message]
2026-07-14 0:50 ` Xu, Even
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=20260713133544.D7D2A1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=panchuang@vivo.com \
--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