RE: [PATCH 2/2] hwmon: (pmbus/max20830) add driver for max20830
"Torreno, Alexis Czezar" <[email protected]>
| Newsgroups | dev.linux.lists.sashiko,org.kernel.vger.linux-hwmon |
|---|---|
| Message-ID | <PH0PR03MB6351D607FACABC276EFAEF01F1222@PH0PR03MB6351.namprd03.prod.outlook.com> |
> >>> 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 ? > Sure, let me try this soon and get back to you on the results.