Re: [PATCH v2 1/8] Add Advantech EIO driver
Lee Jones <[email protected]> Thu, 16 Jul 2026 12:26:28 +0100
| Newsgroups | org.kernel.vger.linux-watchdog,dev.linux.lists.mfd,dev.linux.lists.sashiko-reviews,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-hwmon |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 14 Jul 2026, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 15 potential issue(s) to consider: > - [Critical] Driver uses zero-initialized `pmc[0]` array without verifying if the primary EC was successfully initialized, causing unintended I/O on system port 0x00. > - [High] Missing success return for supported legacy code bases in `firmware_code_base()`. > - [High] Incorrect validation of `devm_ioport_map()` return value. > - [Medium] The `mfd_cell` array `eio_devs` is not declared as `const`. > - [Medium] The driver uses `PLATFORM_DEVID_NONE` instead of `PLATFORM_DEVID_AUTO`, risking sysfs naming collisions. > - [Medium] `acpi_ram_access()` truncates negative error codes into positive 8-bit integers. > - [Medium] The requested region for the PNP base ports is off-by-one and fails to reserve the data port. > - [Medium] Missing resource request for the dynamically discovered PMC command port. > - [Medium] Unaligned memory access and endianness assumptions in `info_show()`. > - [Medium] The IO port memory mapping is sized statically up to `0x49A`, but accesses dynamically discovered hardware registers which can exceed the mapped bounds. > - [Medium] `pmc_clear` checks the wrong status bit (`IBF` instead of `OBF`) before attempting to clear pending garbage data. > - [Medium] Hardware PNP configuration mode is left unlocked on error and skip paths in `eio_init()`. > - [Low] The commit message prefix violates MFD subsystem naming conventions. > - [Low] `MFD_EIO` uses the `isa_driver` API but lacks a Kconfig dependency on `ISA_BUS_API`. > - [Low] Driver-specific header file is improperly placed in the global `include/linux/mfd/` directory. That should keep you busy for a while. Dropping this from my queue. -- Lee Jones