From: sashiko-bot@kernel.org
To: "Atanas Filipov" <atanas.filipov@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/3] interconnect: qcom: Add CAMNOC interconnect provider driver
Date: Wed, 19 Aug 2026 09:41:45 +0000 [thread overview]
Message-ID: <20260819094145.93B671F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819093211.1436275-3-atanas.filipov@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Off-by-one error and dead code in interconnect node linking loop condition.
- [Low] The `buswidth` field in `struct qcom_camnoc_node` is initialized for all nodes but never used.
--
--- Patch [2]: [PATCH v2 2/3] interconnect: qcom: Add CAMNOC interconnect provider driver ---
commit 2b98e7c9cd72541b2414334c311ac7fd888628a6
Author: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
interconnect: qcom: Add CAMNOC interconnect provider driver
This commit adds an interconnect provider for the Qualcomm Camera NOC (CAMNOC).
It aggregates bandwidth requests from camera sub-devices and translates them
into clock rate updates, resolving a last-writer-wins race condition from
direct clock manipulation.
> diff --git a/drivers/interconnect/qcom/qcom-camnoc.c b/drivers/interconnect/qcom/qcom-camnoc.c
> new file mode 100644
> index 0000000000000..9a703b052b2dd
> --- /dev/null
> +++ b/drivers/interconnect/qcom/qcom-camnoc.c
[ ... ]
> +struct qcom_camnoc_icc_provider {
> + struct clk *clk;
> + struct icc_provider provider;
> +};
> +
> +struct qcom_camnoc_node {
> + const char *name;
> + u16 buswidth;
> +};
[Severity: Low]
This isn't a bug, but the buswidth field is populated for all nodes but never
used. Could it be removed to simplify the code, since the driver directly
treats the requested peak_bw as a frequency vote?
[ ... ]
> + /* Link every master to the single CAMNOC AXI slave. */
> + for (i = 0; i < CAMNOC_NUM_NODES - 1; i++) {
> + if (camnoc_nodes[i] == &camnoc_slave_axi)
> + continue;
> + ret = icc_link_nodes(data->nodes[i],
> + &data->nodes[SLAVE_CAMNOC_AXI]);
> + if (ret)
> + goto err_remove;
> + }
[Severity: Low]
Does this loop condition unintentionally skip the last node, making the
camnoc_slave_axi check dead code?
Because the loop stops at CAMNOC_NUM_NODES - 2, it will never evaluate the
last element. Since camnoc_slave_axi happens to be the last node in the
array, the code works correctly now, but if the array is reordered or new
nodes are added after the slave, this logic could silently fail to link the
nodes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819093211.1436275-1-atanas.filipov@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-08-19 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 9:32 [PATCH v2 0/3] Add Qualcomm CAMNOC ICC provider Atanas Filipov
2026-08-19 9:32 ` [PATCH v2 1/3] dt-bindings: interconnect: Add Qualcomm CAMNOC ICC binding Atanas Filipov
2026-08-19 9:32 ` [PATCH v2 2/3] interconnect: qcom: Add CAMNOC interconnect provider driver Atanas Filipov
2026-08-19 9:41 ` sashiko-bot [this message]
2026-08-19 9:32 ` [PATCH v2 3/3] arm64: dts: qcom: sm8250: Add CAMNOC ICC provider node Atanas Filipov
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=20260819094145.93B671F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=atanas.filipov@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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