From: sashiko-bot@kernel.org
To: "Pan Chuang" <panchuang@vivo.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH 3/4] HID: intel-ish-hid: ipc: Remove redundant dev_err()
Date: Mon, 13 Jul 2026 13:43:27 +0000 [thread overview]
Message-ID: <20260713134327.A51F81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260713132439.380121-4-panchuang@vivo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The `bh_hbm_work_fn` background task lacks a loop to process all pending messages, which can result in bus messages getting permanently stuck in the ring buffer (`rd_msg_fifo`).
--
--- Patch [3]: [PATCH 3/4] HID: intel-ish-hid: ipc: Remove redundant dev_err() ---
commit caab51c18c54958eb317830d35603876995d77e0
Author: Pan Chuang <panchuang@vivo.com>
HID: intel-ish-hid: ipc: Remove redundant dev_err()
The commit removes a redundant dev_err() call from ish_probe() after
devm_request_irq(). The devm_request_irq() function handles its own
logging on failure, making the driver-specific error message unnecessary.
> diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> index ed3405c05e73c..cef1030643f15 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
[ ... ]
> @@ -232,10 +232,8 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> ret = devm_request_irq(dev, pdev->irq, ish_irq_handler,
> irq_flag, KBUILD_MODNAME, ishtp);
> - if (ret) {
> - dev_err(dev, "ISH: request IRQ %d failed\n", pdev->irq);
> + if (ret)
> return ret;
> - }
>
> dev_set_drvdata(ishtp->devc, ishtp);
While looking at this subsystem, I noticed a pre-existing issue in the
related HBM processing path.
drivers/hid/intel-ish-hid/ishtp/hbm.c:
> void bh_hbm_work_fn(struct work_struct *work)
> {
[ ... ]
> spin_lock_irqsave(&dev->rd_msg_spinlock, flags);
> if (dev->rd_msg_fifo_head != dev->rd_msg_fifo_tail) {
> memcpy(hbm, dev->rd_msg_fifo + dev->rd_msg_fifo_head,
> IPC_PAYLOAD_SIZE);
> dev->rd_msg_fifo_head =
> (dev->rd_msg_fifo_head + IPC_PAYLOAD_SIZE) %
> (RD_INT_FIFO_SIZE * IPC_PAYLOAD_SIZE);
> spin_unlock_irqrestore(&dev->rd_msg_spinlock, flags);
> ishtp_hbm_dispatch(dev, (struct ishtp_bus_message *)hbm);
> } else {
> spin_unlock_irqrestore(&dev->rd_msg_spinlock, flags);
> }
> }
[Severity: High]
This is a pre-existing issue, but does bh_hbm_work_fn() need a loop to
process all pending messages?
Currently, it pops and processes exactly one message from rd_msg_fifo
before returning. If recv_hbm() adds a second message and calls
queue_work() before this worker thread begins execution, the second
queue_work() is a no-op because the work is already pending.
Could this leave crucial IPC bus messages from the firmware stuck in the
rd_msg_fifo ring buffer indefinitely until another arbitrary interrupt
arrives?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260713132439.380121-1-panchuang@vivo.com?part=3
next prev parent reply other threads:[~2026-07-13 13:43 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 [this message]
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
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=20260713134327.A51F81F000E9@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