From: sashiko-bot@kernel.org
To: "Abdurrahman Hussain via B4 Relay"
<devnull+abdurrahman.nexthop.ai@kernel.org>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 3/7] hwmon: (pmbus/adm1266) add firmware_revision debugfs entry
Date: Sat, 09 May 2026 00:38:38 +0000 [thread overview]
Message-ID: <20260509003839.64E84C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260508-adm1266-v1-3-ec08bf29e0ce@nexthop.ai>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added `firmware_revision` debugfs attribute does not implement the required locking, violating hwmon subsystem guidelines.
--
commit f5df7ce75de0c22a0deb00195b618fb596ec7c9a
Author: Abdurrahman Hussain <abdurrahman@nexthop.ai>
hwmon: (pmbus/adm1266) add firmware_revision debugfs entry
This commit adds a debugfs entry to read and report the ADM1266 firmware
revision. It fetches the data via the manufacturer-specific IC_DEVICE_REV
block-read command.
> diff --git a/drivers/hwmon/pmbus/adm1266.c b/drivers/hwmon/pmbus/adm1266.c
> index ba8a025095287..5cfca00a44682 100644
> --- a/drivers/hwmon/pmbus/adm1266.c
> +++ b/drivers/hwmon/pmbus/adm1266.c
[ ... ]
> +static int adm1266_firmware_revision_read(struct seq_file *s, void *pdata)
> +{
> + struct device *dev = s->private;
> + struct i2c_client *client = to_i2c_client(dev);
> + u8 buf[I2C_SMBUS_BLOCK_MAX];
> + int ret;
> +
> + ret = i2c_smbus_read_block_data(client, ADM1266_IC_DEVICE_REV, buf);
Does this function need to take the hardware monitoring lock before accessing
the device?
The subsystem guidelines state that drivers must implement locking for
attributes registered by other means than the standard sysfs info parameter.
Would it be appropriate to wrap this I2C read with hwmon_lock() and
hwmon_unlock() to prevent concurrent access issues?
> + if (ret < 0)
> + return ret;
> + if (ret < 3)
> + return -EIO;
> +
> + seq_printf(s, "%u.%u.%u\n", buf[0], buf[1], buf[2]);
> +
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260508-adm1266-v1-0-ec08bf29e0ce@nexthop.ai?part=3
next prev parent reply other threads:[~2026-05-09 0:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 23:33 [PATCH 0/7] hwmon: (pmbus/adm1266) RTC fix, blackbox, FW rev, rtc_class Abdurrahman Hussain via B4 Relay
2026-05-08 23:33 ` [PATCH 1/7] hwmon: (pmbus/adm1266) use wall-clock seconds for SET_RTC Abdurrahman Hussain via B4 Relay
2026-05-08 23:48 ` sashiko-bot
2026-05-08 23:33 ` [PATCH 2/7] hwmon: (pmbus/adm1266) write fractional-seconds field of SET_RTC Abdurrahman Hussain via B4 Relay
2026-05-09 0:06 ` sashiko-bot
2026-05-08 23:33 ` [PATCH 3/7] hwmon: (pmbus/adm1266) add firmware_revision debugfs entry Abdurrahman Hussain via B4 Relay
2026-05-09 0:38 ` sashiko-bot [this message]
2026-05-08 23:33 ` [PATCH 4/7] hwmon: (pmbus/adm1266) add clear_blackbox " Abdurrahman Hussain via B4 Relay
2026-05-09 1:10 ` sashiko-bot
2026-05-08 23:33 ` [PATCH 5/7] hwmon: (pmbus/adm1266) add powerup_counter " Abdurrahman Hussain via B4 Relay
2026-05-09 1:48 ` sashiko-bot
2026-05-08 23:33 ` [PATCH 6/7] hwmon: (pmbus/adm1266) register rtc_class device backed by SET_RTC Abdurrahman Hussain via B4 Relay
2026-05-09 2:26 ` sashiko-bot
2026-05-08 23:33 ` [PATCH 7/7] hwmon: (pmbus/adm1266) include adapter number in GPIO line label Abdurrahman Hussain via B4 Relay
2026-05-09 2:39 ` sashiko-bot
2026-05-09 14:14 ` [PATCH 0/7] hwmon: (pmbus/adm1266) RTC fix, blackbox, FW rev, rtc_class Guenter Roeck
2026-05-09 21:58 ` Abdurrahman Hussain
2026-05-09 23:49 ` Guenter Roeck
2026-05-11 3:46 ` Abdurrahman Hussain
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=20260509003839.64E84C2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+abdurrahman.nexthop.ai@kernel.org \
--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