Re: [PATCH 2/2] hwmon: (pmbus/max20830) add driver for max20830
Guenter Roeck <[email protected]>
| Newsgroups | dev.linux.lists.sashiko,org.kernel.vger.linux-hwmon |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 4/14/26 19:21, Torreno, Alexis Czezar wrote: >> On 4/13/26 21:56, [email protected] wrote: >>> Sashiko AI review found 3 potential issue(s): >>> - [Medium] The driver incorrectly uses `i2c_smbus_read_i2c_block_data` >> instead of `i2c_smbus_read_block_data`, violating the protocol and logging an >> untrusted binary buffer. >>> - [Low] The MODULE_IMPORT_NS macro uses an unquoted identifier, >> resulting in a build failure. >>> - [Low] The sysfs attribute `in2_alarm` is created but not documented. >>> -- >>> >> >> The reported issues seem real. Please address. >> > > Will fix the missing in2_alarm and lacking quotes in MODULE_IMPORT_NS macro > > I may need to keep i2c_smbus_read_i2c_block_data. I'm testing this on an rpi4 and > it seems i2c_smbus_read_block_data isn't supported by the adapter. > Odd. I can see that the bcm2835 controller driver sets I2C_FUNC_SMBUS_EMUL but not I2C_FUNC_SMBUS_BLOCK_DATA. That makes me wonder if the controller really does not support block reads. Any chance you can try setting that flag in ./drivers/i2c/busses/i2c-bcm2835.c and see what happens ? Thanks, Guenter