Re: [PATCH] hwmon: (sg2042-mcu) reject short uptime reads

Guenter Roeck <[email protected]> Sun, 2 Aug 2026 07:13:54 -0700
Newsgroups org.kernel.vger.linux-hwmon,dev.linux.lists.sashiko-reviews
Message-ID <[email protected]>
On 8/2/26 06:24, [email protected] wrote:
> Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
> 
> Pre-existing issues:
> - [High] Architectural and locking model violation: custom sysfs attributes are registered directly on the I2C device rather than through the hwmon core.

Ok because the atributes are not hwmon attributes but associated with the MCU.

> - [High] Arithmetic overflow when converting user input to degrees in `sg2042_mcu_write` allows bypassing maximum limits.

Correct
> - [Medium] The I2C probe function checks for `I2C_FUNC_SMBUS_BLOCK_DATA` but the driver requires `I2C_FUNC_SMBUS_READ_I2C_BLOCK`.

Correct, and common issue.

Guenter