Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Colin Huang" <colin.huang2@amd.com>
Cc: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725
Date: Mon, 07 Sep 2026 03:34:55 +0000	[thread overview]
Message-ID: <20260907033455.A28DF1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907-add-tda38740-and-tda38725-v1-2-e2db1b2566b1@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The i2c_device_id array uses unnamed (positional) initializers, violating the I2C subsystem guidelines.
--

commit eb4e8412377fc06c23e75ea2aa72286755317004
Author: Colin Huang <u8813345@gmail.com>

hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725

This commit adds a new PMBus driver for the Infineon TDA38740 and TDA38725
single-voltage synchronous buck regulators.

> diff --git a/drivers/hwmon/pmbus/tda38740.c b/drivers/hwmon/pmbus/tda38740.c
> new file mode 100644
> index 0000000000000..4217a5a9ee661
> --- /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);
> +	if (!data)
> +		return -ENOMEM;
> +	memcpy(&data->info, &tda38740_info, sizeof(tda38740_info));
> +
> +	return pmbus_do_probe(client, &data->info);
> +}
> +
> +static const struct i2c_device_id tda38740_id[] = {
> +	{"tda38725"},
> +	{"tda38740"},
> +	{}
> +};

[Severity: Low]
Could we update this i2c_device_id array to use C99 named initializers? The
I2C subsystem guidelines mandate the use of named initializers for initialized
arrays of type struct i2c_device_id.

> +MODULE_DEVICE_TABLE(i2c, tda38740_id);

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-add-tda38740-and-tda38725-v1-0-e2db1b2566b1@gmail.com?part=2

      reply	other threads:[~2026-09-07  3:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07  3:28 [PATCH 0/2] Add driver for Infineon TDA38740/TDA38725 Colin Huang
2026-09-07  3:28 ` [PATCH 1/2] dt-bindings: hwmon: pmbus: Add Infineon tda38740 and tda38725 Colin Huang
2026-09-07  3:33   ` sashiko-bot
2026-09-07  3:28 ` [PATCH 2/2] hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725 Colin Huang
2026-09-07  3:34   ` sashiko-bot [this message]

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=20260907033455.A28DF1F00A3A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox