From: sashiko-bot@kernel.org
To: "Birk Skyum" <birk.skyum@pm.me>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [RFC PATCH v2 2/2] platform: arm64: qcom-hamoa-ec: test sensor and variant handling
Date: Tue, 08 Sep 2026 14:20:03 +0000 [thread overview]
Message-ID: <20260908142003.B5AD51F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908135801.81436-3-birk.skyum@pm.me>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Low] Assigning string literal to `void *` may discard const qualifier under strict compiler settings.
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but if `qcom_ec_probe` fails after enabling SCI events, the EC hardware is left asserting interrupts, leading to a potential IRQ storm.
--
commit 90290d681747d36fb1644086aa165106f32f7e12
Author: Birk Skyum <birk.skyum@pm.me>
platform: arm64: qcom-hamoa-ec: test sensor and variant handling
Exercise the sensor callbacks against a simulated I2C adapter. Check
little-endian RPM decoding, short transfers, malformed byte counts,
the unavailable-temperature sentinel and propagation of bus errors.
> diff --git a/drivers/platform/arm64/qcom-hamoa-ec-test.c b/drivers/platform/arm64/qcom-hamoa-ec-test.c
> new file mode 100644
> index 0000000000000..68868ef7625ae
> --- /dev/null
> +++ b/drivers/platform/arm64/qcom-hamoa-ec-test.c
> @@ -0,0 +1,294 @@
[ ... ]
> +static void qcom_ec_variant_test(struct kunit *test)
> +{
> + static const char compatible[] = "lenovo,yoga-slim7x-ec\0qcom,hamoa-crd-ec";
> + struct property property = {
> + .name = "compatible",
> + .length = sizeof(compatible),
> + .value = (void *)compatible,
> + };
> + struct device_node node = { .properties = &property };
> + const struct of_device_id *match;
> +
> + match = of_match_node(qcom_ec_of_match, &node);
> + KUNIT_ASSERT_NOT_NULL(test, match);
> + KUNIT_EXPECT_PTR_EQ(test, match->data, &qcom_ec_slim7x);
> + property.value = "qcom,hamoa-crd-ec";
[Severity: Low]
Does this assignment cause a compiler warning? It places a string literal into
property.value (which is a void pointer) without a cast, which may discard
the const qualifier under strict compiler settings.
> + property.length = sizeof("qcom,hamoa-crd-ec");
> + match = of_match_node(qcom_ec_of_match, &node);
> + KUNIT_ASSERT_NOT_NULL(test, match);
> + KUNIT_EXPECT_PTR_EQ(test, match->data, &qcom_ec_reference);
> +}
[ ... ]
[Severity: High]
This isn't a bug introduced by this patch, but I noticed a potential problem in
qcom_ec_probe().
If qcom_ec_probe() fails after enabling SCI events, the EC hardware is left
asserting interrupts, leading to a potential IRQ storm:
drivers/platform/arm64/qcom-hamoa-ec.c:qcom_ec_probe() {
...
ret = qcom_ec_sci_evt_control(dev, true);
if (ret < 0)
return dev_err_probe(dev, ret, "Failed to enable SCI events\n");
ret = qcom_ec_thermal_capabilities(dev);
if (ret < 0)
return dev_err_probe(dev, ret, "Failed to read thermal capabilities\n");
...
}
Since SCI events are enabled on the hardware here, but there is no cleanup
mechanism (e.g. devm_add_action_or_reset) to disable them if subsequent probe
steps fail, can this lead to an unhandled IRQ storm until the kernel core
forcibly disables the IRQ line?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908135801.81436-1-birk.skyum@pm.me?part=2
next prev parent reply other threads:[~2026-09-08 14:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 13:58 [RFC PATCH v2 0/2] Monitor Yoga Slim 7x EC sensors without taking over cooling Birk Skyum
2026-09-08 13:58 ` [RFC PATCH v2 1/2] platform: arm64: qcom-hamoa-ec: monitor Slim 7x legacy sensors Birk Skyum
2026-09-08 14:08 ` sashiko-bot
2026-09-08 14:36 ` Birk Skyum
2026-09-09 4:58 ` Anvesh Jain P
2026-09-15 9:28 ` Anvesh Jain P
2026-10-14 8:08 ` Ilpo Järvinen
2026-09-08 13:58 ` [RFC PATCH v2 2/2] platform: arm64: qcom-hamoa-ec: test sensor and variant handling Birk Skyum
2026-09-08 14:20 ` sashiko-bot [this message]
2026-10-14 7:59 ` Ilpo Järvinen
2026-09-15 9:23 ` [RFC PATCH v2 0/2] Monitor Yoga Slim 7x EC sensors without taking over cooling Anvesh Jain P
2026-09-15 14:17 ` Birk Skyum
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=20260908142003.B5AD51F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=birk.skyum@pm.me \
--cc=linux-hwmon@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