From: sashiko-bot@kernel.org
To: "Pan Chuang" <panchuang@vivo.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH 1/4] HID: amd_sfh: Remove redundant dev_err()
Date: Mon, 13 Jul 2026 13:34:57 +0000 [thread overview]
Message-ID: <20260713133457.AEB9E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260713132439.380121-2-panchuang@vivo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The driver requests a legacy PCI interrupt without the IRQF_SHARED flag and unconditionally returns IRQ_HANDLED.
--
--- Patch [1]: [PATCH 1/4] HID: amd_sfh: Remove redundant dev_err() ---
commit 545a05506a276434e2b80762c55fb8e2b1f6fc64
Author: Pan Chuang <panchuang@vivo.com>
HID: amd_sfh: Remove redundant dev_err()
This commit removes a driver-specific error logging call after
devm_request_irq() because the core API now automatically logs detailed
error messages on failure.
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 4b81cebdc3359..a2acd3ca20e2c 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -128,11 +128,8 @@ int amd_sfh_irq_init_v2(struct amd_mp2_dev *privdata)
>
> rc = devm_request_irq(&privdata->pdev->dev, privdata->pdev->irq,
> amd_sfh_irq_handler, 0, DRIVER_NAME, privdata);
[Severity: High]
This is a pre-existing issue, but does this code need to handle shared
interrupts?
Since this requests a legacy PCI interrupt (INTx) with irqflags=0, it requests
exclusive access to the IRQ. If the interrupt is routed to a shared line with
another device, will devm_request_irq() fail with -EBUSY and prevent the
driver from probing?
Additionally, the interrupt handler unconditionally returns IRQ_HANDLED:
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:amd_sfh_irq_handler() {
amd_sfh_clear_intr(data);
return IRQ_HANDLED;
}
If this driver successfully claims the IRQ first and the line is shared,
would this unconditional return erroneously suppress the kernel's unhandled
interrupt detection for other devices on the same line?
> - if (rc) {
> - dev_err(&privdata->pdev->dev, "failed to request irq %d err=%d\n",
> - privdata->pdev->irq, rc);
> + if (rc)
> return rc;
> - }
>
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260713132439.380121-1-panchuang@vivo.com?part=1
next prev parent reply other threads:[~2026-07-13 13:34 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 [this message]
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
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=20260713133457.AEB9E1F000E9@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