From: sashiko-bot@kernel.org
To: Quchaosheng <quchaosheng000406@163.com>
Cc: conor+dt@kernel.org, "Oleksij Rempel" <o.rempel@pengutronix.de>,
"Vincent Mailhol" <mailhol@kernel.org>,
devicetree@vger.kernel.org,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
robh@kernel.org, "Oliver Hartkopp" <socketcan@hartkopp.net>,
linux-can@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema
Date: Mon, 14 Sep 2026 03:09:54 +0000 [thread overview]
Message-ID: <20260914030954.85EF31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914030215.437602-1-quchaosheng000406@163.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] platform_get_irq() error code is shadowed.
- [High] Incorrect check of uninitialized field priv->cpu_interface instead of pdata->cir.
--
commit 534a229fcad73012a922f469773dd3f6d658bb9e
Author: Quchaosheng <quchaosheng000406@163.com>
dt-bindings: net: can: bosch,cc770: Convert to DT schema
This commit converts the Bosch CC770 and Intel AN82527 controller binding from
free-form text to DT schema. It also references the common can-controller.yaml
schema and documents additional properties used by the driver.
> diff --git a/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml b/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
> new file mode 100644
> index 0000000000000..448d5b4f74b57
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
> @@ -0,0 +1,109 @@
[ ... ]
> +properties:
> + compatible:
> + enum:
> + - bosch,cc770
> + - intc,82527
[Severity: High]
This is a pre-existing issue, but while looking at the platform data
initialization for this controller, I noticed that the clock divider logic
seems to check an uninitialized field.
In drivers/net/can/cc770/cc770_platform.c:cc770_get_platform_data():
priv->can.clock.freq = pdata->osc_freq;
if (priv->cpu_interface & CPUIF_DSC)
priv->can.clock.freq /= 2;
priv->clkout = pdata->cor;
priv->bus_config = pdata->bcr;
priv->cpu_interface = pdata->cir;
Since priv->cpu_interface is assigned pdata->cir after the check, is
priv->cpu_interface unconditionally 0 here due to the zero-initialization
during allocation? If so, will this prevent the frequency from being correctly
halved when CPUIF_DSC is set in the platform data?
[ ... ]
> + reg:
> + description:
> + Register window of the controller. On a PowerPC system the controller
> + sits on the local bus and the property describes the chip select, the
> + address offset and the size, the size usually being 0x80.
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing the interrupt
handling property, I noticed the driver shadows the error code during probe.
In drivers/net/can/cc770/cc770_platform.c:cc770_platform_probe():
irq = platform_get_irq(pdev, 0);
if (!mem || irq <= 0)
return -ENODEV;
If platform_get_irq() returns a negative error code such as -EPROBE_DEFER,
the function unconditionally returns -ENODEV instead of the actual error.
Could this permanently prevent the device from probing if its interrupt
controller is initialized after the CC770 driver?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914030215.437602-1-quchaosheng000406@163.com?part=1
next prev parent reply other threads:[~2026-09-14 3:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 3:02 [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema Quchaosheng
2026-09-14 3:02 ` [PATCH] net: can: cc770: update the binding file reference in the driver comment Quchaosheng
2026-09-14 3:06 ` sashiko-bot
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema Quchaosheng
2026-09-14 3:12 ` sashiko-bot
2026-09-15 10:52 ` Krzysztof Kozlowski
2026-09-17 9:21 ` Quchaosheng
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: " Quchaosheng
2026-09-14 3:12 ` sashiko-bot
2026-09-14 3:09 ` sashiko-bot [this message]
2026-09-23 2:30 ` [PATCH] dt-bindings: net: can: bosch,cc770: " Quchaosheng
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=20260914030954.85EF31F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=o.rempel@pengutronix.de \
--cc=quchaosheng000406@163.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=socketcan@hartkopp.net \
/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