Re: [PATCH v6 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver
Drew Fustini <[email protected]> Wed, 29 Jul 2026 19:11:14 -0700
| Newsgroups | org.infradead.lists.linux-riscv,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <amqywoRHZO9xKD+V@x1> |
On Thu, Jul 30, 2026 at 01:21:24AM +0000, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The probe function unconditionally fails if the `riscv,cbqri-rcid` device tree property is missing, which breaks support for monitoring-only capacity controllers. > -- > > --- Patch [8]: [PATCH v6 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver --- > commit 954af62b51bb07d376a8671fb6db032a2ae482bc > Author: Drew Fustini <[email protected]> > > riscv_cbqri: Add CBQRI capacity allocation platform driver > > This commit adds a device-tree platform driver for the RISC-V CBQRI capacity > controller. It binds to the "riscv,cbqri-capacity-controller" compatible, > determines the cache domain, and registers the controller with the resctrl > framework. > > > 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 > [ ... ] > > +static int cbqri_capacity_probe(struct platform_device *pdev) > > +{ > [ ... ] > > + 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] > Will this unconditionally failing check prevent monitoring-only controllers > from probing? > > The core registration logic in riscv_cbqri_register_cc_dt() indicates that > monitoring-only controllers do not need an RCID count. > > However, by returning an error when the riscv,cbqri-rcid property is absent, > the driver appears to reject valid monitoring-only controllers before they > can be registered. > > Would it be better to treat this property as optional and default rcid_count > to 0 if it is missing? This series only implements allocation, so there is no monitoring-only controller to describe yet. Drew _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv