Re: [PATCH 00/31] hwmon: convert i2c_smbus_read_block_data() users to pass buffer length

From: Guenter Roeck

Date: Sun Oct 25 2026 - 20:11:39 EST


On Sat, Oct 24, 2026 at 08:06:03PM -0700, Dmitry Torokhov wrote:
> Convert all callers of i2c_smbus_read_block_data() across the hwmon
> and PMBus subsystems to pass destination buffer sizes, adopting the
> 4-argument form introduced in commit 68f382641f8c ("i2c: smbus: make
> i2c_smbus_read_block_data() safer").
>
> For drivers that used intermediate bounce buffers (lineage-pem, lm93,
> and pt5161l), redundant buffer allocations and memcpy() calls are
> dropped so data is read directly into target structures.
>
> For drivers performing string comparisons on the read data
> (acbel-fsg032, bpa-rs600, ltc4286, max15301, pim4328, and stpddc60),
> ensure the destination buffer is explicitly NUL-terminated before
> comparison, and pass a length that reserves space for the terminator.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Series applied.

Thanks,
Guenter