From: sashiko-bot@kernel.org
To: "Brian Chiang" <chiang.brian@inventec.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v7 2/2] hwmon: (pmbus/q54sj108a2) Add support for q50sn12072 and q54sn120a1
Date: Wed, 29 Apr 2026 11:59:11 +0000 [thread overview]
Message-ID: <20260429115912.A38E0C19425@smtp.kernel.org> (raw)
In-Reply-To: <20260429-add-support-for-q50sn12072-and-q54sn120a1-v7-2-f1f83d2039f7@inventec.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Returning 0 on `devm_kzalloc` failure causes silent driver probe failure.
- [Medium] The patch introduces several significant bug fixes and refactorings that are not mentioned in the commit message.
--
commit 64436d69954e3cda83f05bdee9e09fc2269a2808
Author: Jack Cheng <cheng.jackhy@inventec.com>
hwmon: (pmbus/q54sj108a2) Add support for q50sn12072 and q54sn120a1
This commit adds support for the Delta Q50SN12072 and Q54SN120A1 DC-DC
power modules to the q54sj108a2 driver.
> Add support for them to q54sj108a2 driver.
This isn't a bug, but the commit message only mentions adding support for
the new modules. However, the patch also includes several other changes:
adding PMBus locking in the debugfs read/write paths, fixing the
WRITE_PROTECT restore logic, modifying the configuration for the existing
q54sj108a2 module, and refactoring the device identification logic.
Could the commit message be updated to describe these additional changes,
or should they be split into separate patches?
> diff --git a/drivers/hwmon/pmbus/q54sj108a2.c b/drivers/hwmon/pmbus/q54sj108a2.c
> --- a/drivers/hwmon/pmbus/q54sj108a2.c
> +++ b/drivers/hwmon/pmbus/q54sj108a2.c
[ ... ]
> @@ -333,16 +384,17 @@ static int q54sj108a2_probe(struct i2c_client *client)
> return -ENODEV;
> }
>
> - ret = pmbus_do_probe(client, &q54sj108a2_info[chip_id]);
> - if (ret)
> - return ret;
> -
> psu = devm_kzalloc(&client->dev, sizeof(*psu), GFP_KERNEL);
> if (!psu)
> return 0;
Because the psu allocation was moved before pmbus_do_probe(), returning 0
on allocation failure now skips registering the hwmon device entirely.
Since the probe function returns success (0), does this leave the driver
in a broken state? Should this return -ENOMEM instead?
>
> + psu->chip = chip_id;
> psu->client = client;
>
> + ret = pmbus_do_probe(client, &q54sj108a2_info[chip_id]);
> + if (ret)
> + return ret;
> +
> debugfs = pmbus_get_debugfs_dir(client);
>
> q54sj108a2_dir = debugfs_create_dir(client->name, debugfs);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260429-add-support-for-q50sn12072-and-q54sn120a1-v7-0-f1f83d2039f7@inventec.com?part=2
next prev parent reply other threads:[~2026-04-29 11:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 11:29 [PATCH v7 0/2] Add support for q50sn12072 and q54sn120a1 Brian Chiang
2026-04-29 11:29 ` [PATCH v7 1/2] dt-bindings: trivial: Add q50sn12072 and q54sn120a1 support Brian Chiang
2026-04-29 11:29 ` [PATCH v7 2/2] hwmon: (pmbus/q54sj108a2) Add support for q50sn12072 and q54sn120a1 Brian Chiang
2026-04-29 11:59 ` sashiko-bot [this message]
2026-04-30 6:58 ` Brian Chiang
2026-04-30 14:01 ` Guenter Roeck
2026-05-04 3:46 ` Brian Chiang
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=20260429115912.A38E0C19425@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chiang.brian@inventec.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko@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