Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Zi-Yu Chen" <zychennvt@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/4] thermal/drivers/ma35d1: Add Nuvoton MA35D1 thermal sensor driver
Date: Tue, 17 Nov 2026 06:23:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-218249@kernel.org> (raw)
In-Reply-To: <20261117060501.2611071-4-zychennvt@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] thermal/ma35d1: undeclared devm_kzalloc_obj() in
  ma35d1_thermal_probe()
--

commit 7c4743b2d7c9ded9bc14984d2384e4a19e5bfbcd
Author: Zi-Yu Chen <zychennvt@gmail.com>

thermal/drivers/ma35d1: Add Nuvoton MA35D1 thermal sensor driver

This commit adds a thermal sensor driver for the Nuvoton MA35D1 SoC,
instantiated as an auxiliary device by the MA35D1 reset driver and
accessing the sensor register via a syscon regmap.

> diff --git a/drivers/thermal/ma35d1_thermal.c b/drivers/thermal/ma35d1_thermal.c
> new file mode 100644
> index 0000000000000..453f57d236ecc
> --- /dev/null
> +++ b/drivers/thermal/ma35d1_thermal.c
> @@ -0,0 +1,149 @@

[ ... ]

> +static int ma35d1_thermal_probe(struct auxiliary_device *adev,
> +				const struct auxiliary_device_id *id)
> +{
> +	struct device *dev = &adev->dev;
> +	struct thermal_zone_device *tzd;
> +	struct ma35d1_thermal *sensor;
> +	int ret;
> +
> +	sensor = devm_kzalloc_obj(dev, *sensor);
> +	if (!sensor)
> +		return -ENOMEM;

[Severity: High]
Does this fail to build when CONFIG_MA35D1_THERMAL is enabled?
include/linux/slab.h defines kzalloc_obj(), but there is no device-managed
devm_kzalloc_obj() helper in the kernel, so compilation fails with an
implicit function declaration error.  Should this call
devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL) instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117060501.2611071-1-zychennvt@gmail.com?part=3

  reply	other threads:[~2026-11-17  6:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  6:04 [PATCH 0/4] Add Nuvoton MA35D1 thermal sensor support Zi-Yu Chen
2026-11-17  6:04 ` [PATCH 1/4] dt-bindings: reset: nuvoton,ma35d1-reset: Add #thermal-sensor-cells Zi-Yu Chen
2026-11-17  6:04 ` [PATCH 2/4] reset: ma35d1: Register auxiliary device for the temperature sensor Zi-Yu Chen
2026-11-17  6:05 ` [PATCH 3/4] thermal/drivers/ma35d1: Add Nuvoton MA35D1 thermal sensor driver Zi-Yu Chen
2026-11-17  6:23   ` sashiko-bot [this message]
2026-11-17  6:05 ` [PATCH 4/4] arm64: dts: nuvoton: ma35d1: Add thermal zone Zi-Yu Chen

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=sashiko-outbox-218249@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zychennvt@gmail.com \
    /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