From: sashiko-bot@kernel.org
To: "Colin Huang" <colin.huang2@amd.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v4 2/2] hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725
Date: Thu, 10 Sep 2026 12:42:04 +0000 [thread overview]
Message-ID: <20260910124204.ED1B51F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260910-add-tda38740-and-tda38725-v4-2-dbae7fabce09@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `struct tda38740_data` is used and allocated in `tda38740_probe()` but is never defined, causing a compilation error.
--
commit 38416ec86775dd4db25c806a9c1584cb372a401b
Author: Colin Huang <u8813345@gmail.com>
hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725
This commit adds a new PMBus driver for Infineon TDA38740 and TDA38725
single-voltage synchronous buck regulators. It provides standard PMBus
hardware monitoring telemetry.
> diff --git a/drivers/hwmon/pmbus/tda38740.c b/drivers/hwmon/pmbus/tda38740.c
> new file mode 100644
> index 0000000000000..6d3e9884f733b
> --- /dev/null
> +++ b/drivers/hwmon/pmbus/tda38740.c
[ ... ]
> +static int tda38740_probe(struct i2c_client *client)
> +{
> + struct tda38740_data *data;
> +
> + data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
[Severity: Low]
Is struct tda38740_data missing its definition?
It appears this struct is never defined in this file or included headers.
Does this result in a compilation error here, since sizeof() cannot evaluate
an incomplete type?
> + if (!data)
> + return -ENOMEM;
> +
> + memcpy(&data->info, &tda38740_info, sizeof(tda38740_info));
[Severity: Low]
Because the type is incomplete, does dereferencing data->info here also
cause a build failure? Would it be better to define the struct locally
with the info member, or directly allocate a struct pmbus_driver_info
instead?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910-add-tda38740-and-tda38725-v4-0-dbae7fabce09@gmail.com?part=2
next prev parent reply other threads:[~2026-09-10 12:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 12:35 [PATCH v4 0/2] Add driver for Infineon TDA38740/TDA38725 Colin Huang
2026-09-10 12:35 ` [PATCH v4 1/2] dt-bindings: hwmon: pmbus: Add Infineon tda38740 and tda38725 Colin Huang
2026-09-10 12:41 ` sashiko-bot
2026-09-11 8:49 ` Krzysztof Kozlowski
2026-09-10 12:35 ` [PATCH v4 2/2] hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725 Colin Huang
2026-09-10 12:42 ` sashiko-bot [this message]
2026-09-10 15:19 ` Guenter Roeck
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=20260910124204.ED1B51F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=colin.huang2@amd.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.