From: sashiko-bot@kernel.org
To: "Drew Fustini" <fustini@kernel.org>
Cc: linux-kernel@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v8 5/5] riscv_cbqri: Add CBQRI capacity allocation platform driver
Date: Thu, 17 Sep 2026 17:11:15 +0000 [thread overview]
Message-ID: <20260917171116.1AD781F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917-dfustini-atl-sc-cbqri-dt-v8-5-7964e8d73fe8@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] cbqri: probe fails for monitoring-only capacity controllers
--
commit 8ddfa638686f4f96df4bb905203f8a16edb1ece7
Author: Drew Fustini <fustini@kernel.org>
riscv_cbqri: Add CBQRI capacity allocation platform driver
This commit adds a platform driver for CBQRI capacity controllers
described in device tree. The driver registers the controller with
the CBQRI core to expose it through resctrl.
> diff --git a/drivers/resctrl/cbqri_capacity.c b/drivers/resctrl/cbqri_capacity.c
> new file mode 100644
> index 0000000000000..0670a676bdb1f
> --- /dev/null
> +++ b/drivers/resctrl/cbqri_capacity.c
> @@ -0,0 +1,127 @@
[ ... ]
> +static int cbqri_capacity_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct cbqri_controller_info info = {};
> + struct device_node *cache_np;
> + struct resource *res;
> + u32 rcid_count, cache_level;
> + int cache_id, cpu, ret;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (!res)
> + return -EINVAL;
> +
> + ret = of_property_read_u32(dev->of_node, "riscv,cbqri-rcid", &rcid_count);
> + if (ret) {
> + dev_err(dev, "missing riscv,cbqri-rcid\n");
> + return ret;
> + }
[Severity: Medium]
Does this unconditionally fail probe for valid monitoring-only capacity
controllers?
Monitoring-only controllers legitimately omit the riscv,cbqri-rcid property,
but this unconditional check returns an error if the property is missing.
The core driver riscv_cbqri_register_cc_dt() explicitly supports
rcid_count == 0 for monitoring-only controllers, but making this property
mandatory here prevents them from being used.
> +
> + cache_np = of_parse_phandle(dev->of_node, "riscv,cbqri-cache", 0);
> + if (!cache_np) {
> + dev_err(dev, "missing riscv,cbqri-cache phandle\n");
> + return -EINVAL;
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917-dfustini-atl-sc-cbqri-dt-v8-0-7964e8d73fe8@kernel.org?part=5
prev parent reply other threads:[~2026-09-17 17:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:39 [PATCH v8 0/5] riscv: Add initial CBQRI resctrl support Drew Fustini
2026-09-17 16:39 ` [PATCH v8 1/5] riscv_cbqri: Add capacity controller probe and allocation device ops Drew Fustini
2026-09-17 16:39 ` [PATCH v8 2/5] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
2026-09-17 16:57 ` sashiko-bot
2026-09-17 19:59 ` Drew Fustini
2026-09-18 0:54 ` Reinette Chatre
2026-09-17 16:39 ` [PATCH v8 3/5] riscv_cbqri: Make RESCTRL_FS available on RISC-V Drew Fustini
2026-09-17 16:39 ` [PATCH v8 4/5] dt-bindings: riscv: Add binding for CBQRI controllers Drew Fustini
2026-09-17 16:39 ` [PATCH v8 5/5] riscv_cbqri: Add CBQRI capacity allocation platform driver Drew Fustini
2026-09-17 17:11 ` 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=20260917171116.1AD781F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fustini@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--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
all inboxes | Powered by JetHome®