Linux Hardware Monitor development
 help / color / mirror / Atom feed
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 7/7] hwmon: (pmbus/adm1266) include adapter number in GPIO line label
Date: Sat, 09 May 2026 02:39:42 +0000	[thread overview]
Message-ID: <20260509023942.E3692C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260508-adm1266-v1-7-ec08bf29e0ce@nexthop.ai>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The I2C adapter number is incorrectly formatted as hexadecimal instead of decimal in the GPIO line label.
--

commit 79ede8d83182247b49e64822f8f1d3ea0161b1cd
Author: Abdurrahman Hussain <abdurrahman@nexthop.ai>

hwmon: (pmbus/adm1266) include adapter number in GPIO line label

This commit updates the GPIO line labels in the ADM1266 driver to include
the I2C adapter number. This change disambiguates the labels when multiple
devices reside at the same I2C address on different buses.

> diff --git a/drivers/hwmon/pmbus/adm1266.c b/drivers/hwmon/pmbus/adm1266.c
> index 07c20746f0831..ec6a2c9167d82 100644
> --- a/drivers/hwmon/pmbus/adm1266.c
> +++ b/drivers/hwmon/pmbus/adm1266.c
> @@ -293,8 +293,9 @@ static int adm1266_config_gpio(struct adm1266_data *data)
>  	int i;
>  
>  	for (i = 0; i < ARRAY_SIZE(data->gpio_names); i++) {
> -		gpio_name = devm_kasprintf(&data->client->dev, GFP_KERNEL, "adm1266-%x-%s",
> -					   data->client->addr, adm1266_names[i]);
> +		gpio_name = devm_kasprintf(&data->client->dev, GFP_KERNEL, "adm1266-%x-%x-%s",
> +					   data->client->adapter->nr, data->client->addr,

Is the use of %x intended for the I2C adapter number here?

I2C adapter numbers are conventionally represented as decimal integers in
Linux (e.g., i2c-10 or 10-0040). Formatting the adapter number as hexadecimal
means that bus numbers of 10 or greater will be displayed with letters (e.g.,
bus 10 becomes a, resulting in adm1266-a-40-...).

Would using %d for the adapter number better match standard I2C identifiers?

> +					   adm1266_names[i]);
>  		if (!gpio_name)
>  			return -ENOMEM;
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260508-adm1266-v1-0-ec08bf29e0ce@nexthop.ai?part=7

  reply	other threads:[~2026-05-09  2:39 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
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 [this message]
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=20260509023942.E3692C2BCB0@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