[PATCH v6 4/4] nvmem: enable COMPILE_TEST for more drivers
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Sep 20 04:23:51 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] kconfig: missing HAS_IOMEM dependency for MMIO nvmem drivers under COMPILE_TEST
--
commit 0ff6b9a5ebbc0d11589f22b1d652ffd1483b0718
Author: Link Mauve <linkmauve at linkmauve.fr>
nvmem: enable COMPILE_TEST for more drivers
This commit enables COMPILE_TEST for three nvmem drivers (NVMEM_S32G_OCOTP,
NVMEM_SUNXI_SID, and NVMEM_ZYNQMP) that previously depended strictly on their
target architectures. This allows the drivers to be built for coverage testing
across different architectures.
> diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
> index c36c2a4c2a0b7..d38097d6648bd 100644
> --- a/drivers/nvmem/Kconfig
> +++ b/drivers/nvmem/Kconfig
> @@ -354,7 +354,7 @@ config NVMEM_NINTENDO_OTP
>
> config NVMEM_S32G_OCOTP
> tristate "S32G SoC OCOTP support"
> - depends on ARCH_S32
> + depends on ARCH_S32 || COMPILE_TEST
[Severity: Low]
Does adding COMPILE_TEST here expose this driver to build errors on
architectures without HAS_IOMEM?
Because config NVMEM_S32G_OCOTP exposes MMIO operations, a user configuring
the kernel with COMPILE_TEST enabled on an architecture that does not select
HAS_IOMEM (such as User Mode Linux) will encounter linker errors. Adding a
dependency on HAS_IOMEM would prevent this build failure.
> help
> This is a driver for the 'OCOTP' peripheral available on S32G
> platforms.
[ ... ]
> @@ -518,7 +518,7 @@ config NVMEM_SUNPLUS_OCOTP
>
> config NVMEM_SUNXI_SID
> tristate "Allwinner SoCs SID support"
> - depends on ARCH_SUNXI
> + depends on ARCH_SUNXI || COMPILE_TEST
[Severity: Low]
Can this cause an undefined reference to __ioread32_copy during the build?
The NVMEM_SUNXI_SID driver calls __ioread32_copy() in sunxi_sid.c. This
function is implemented in lib/iomap_copy.c, which is only compiled if
CONFIG_HAS_IOMEM is set. Compiling this driver under COMPILE_TEST on
architectures without HAS_IOMEM results in a linker error. Should this
config also depend on HAS_IOMEM?
> help
> This is a driver for the 'security ID' available on various Allwinner
> devices.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260920111000.2404131-1-linkmauve@linkmauve.fr?part=4
More information about the linux-amlogic
mailing list