All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Akshay Gupta" <Akshay.Gupta@amd.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 3/8] hwmon/misc: amd-sbi: Move sbtsi register transfer to core abstraction
Date: Mon, 22 Jun 2026 14:18:13 +0000	[thread overview]
Message-ID: <20260622141813.EA0701F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260622135821.2190260-4-Akshay.Gupta@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Using `select AMD_SBTSI` in `CONFIG_SENSORS_SBTSI` bypasses the dependencies of `AMD_SBTSI`, which can cause Kconfig warnings and linker errors (Build Failure).
--

commit 244321241d8d6647a9adc1fb143dcedb41e11593
Author: Prathima <Prathima.Lk@amd.com>

hwmon/misc: amd-sbi: Move sbtsi register transfer to core abstraction
    
Move the I2C read/write byte operations from the sbtsi hwmon driver into
a common sbtsi_xfer() function in tsi-core.c. This decouples the hwmon
sensor driver from the underlying bus transport, preparing for I3C
support in a subsequent patch.

> diff --git a/drivers/misc/amd-sbi/tsi-core.c b/drivers/misc/amd-sbi/tsi-core.c
> new file mode 100644
> index 0000000000000..6ef1831515bbb
> --- /dev/null
> +++ b/drivers/misc/amd-sbi/tsi-core.c
> @@ -0,0 +1,30 @@
[ ... ]
> +/* I2C transfer function */
> +static int sbtsi_i2c_xfer(struct sbtsi_data *data, u8 reg, u8 *val, bool is_read)
> +{
> +	if (is_read) {
> +		int ret = i2c_smbus_read_byte_data(data->client, reg);

[Severity: High]
Will this lead to a linker error (undefined reference to
i2c_smbus_read_byte_data) if a user configures CONFIG_SENSORS_SBTSI=y and
CONFIG_I2C=m?

The Kconfig option SENSORS_SBTSI uses select AMD_SBTSI but fails to
mirror the dependencies required by AMD_SBTSI (such as depends on
I3C_OR_I2C and architecture restrictions like depends on ARM || ARM64 ||
COMPILE_TEST). 

If CONFIG_I2C=m and CONFIG_SENSORS_SBTSI=y, Kconfig forcefully sets
CONFIG_AMD_SBTSI=y. This triggers an unmet direct dependencies Kconfig
warning, and since tsi-core.c is built-in (y) while I2C is a module (m),
it breaks the build.

This problem was introduced earlier in the series, but it remains
unresolved at the end of the series.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260622135821.2190260-1-Akshay.Gupta@amd.com?part=3

  reply	other threads:[~2026-06-22 14:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 13:58 [PATCH v3 0/8] misc: amd-sbi: Refactor SBTSI driver with I3C support and ioctl interface Akshay Gupta
2026-06-22 13:58 ` [PATCH v3 1/8] hwmon/misc: amd-sbi: Move core sbtsi support from hwmon to misc Akshay Gupta
2026-06-22 14:12   ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 2/8] hwmon: sbtsi_temp: Refactor temperature register access into helpers Akshay Gupta
2026-06-22 14:11   ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 3/8] hwmon/misc: amd-sbi: Move sbtsi register transfer to core abstraction Akshay Gupta
2026-06-22 14:18   ` sashiko-bot [this message]
2026-06-22 13:58 ` [PATCH v3 4/8] misc: amd-sbi: Consolidate Common SBTSI Probe Path for I2C and I3C Akshay Gupta
2026-06-22 14:11   ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 5/8] misc: amd-sbi: Add support for SB-TSI over I3C Akshay Gupta
2026-06-22 14:19   ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 6/8] misc: amd-sbi: Add SBTSI ioctl register transfer interface Akshay Gupta
2026-06-22 14:15   ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 7/8] hwmon: Add mutex protecting for sbtsi read/write through hwmon Akshay Gupta
2026-06-22 14:17   ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 8/8] docs: misc: amd-sbi: Document SBTSI userspace interface Akshay Gupta
2026-06-22 14:12   ` sashiko-bot
2026-06-22 16:57   ` Randy Dunlap

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=20260622141813.EA0701F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Akshay.Gupta@amd.com \
    --cc=linux-hwmon@vger.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.