[PATCH 2/8] nvmem: make all reg_write callbacks take const void *

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Jul 15 11:08:48 PDT 2026


Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Syntax error in `qfprom_reg_write` signature causing compilation failure
- [Low] Incomplete API migration causing widespread incompatible-pointer-types build errors across other subsystems
--

--- Patch [2]: [PATCH 2/8] nvmem: make all reg_write callbacks take const void * ---
commit 7e2f42ea4c9950738972bc60aeca19f14bd93ce4
Author: Link Mauve <linkmauve at linkmauve.fr>

nvmem: make all reg_write callbacks take const void *

This patch updates the reg_write callbacks in the nvmem subsystem to take a
const void pointer instead of a mutable void pointer for the value buffer.

>     nvmem: make all reg_write callbacks take const void *
>     
>     The previous commit switched from a pointer to mutable data to a pointer
>     to immutable data, so let’s fix all users of this API.

[Severity: Low]
Are there users of this API outside of the drivers/nvmem/ directory that were
missed during this migration?

For example, when building drivers like drivers/rtc/rtc-cmos.c or
drivers/misc/eeprom/at24.c, will assigning their unupdated callbacks to
nvmem_config.reg_write trigger incompatible-pointer-types build errors?

> diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
> index a872c640b8c5a..bacdcb5610bae 100644
> --- a/drivers/nvmem/qfprom.c
> +++ b/drivers/nvmem/qfprom.c
[ ... ]
> @@ -253,13 +253,13 @@ static int qfprom_enable_fuse_blowing(const struct qfprom_priv *priv,
>   *
>   * Return: 0 or -err.
>   */
> -static int qfprom_reg_write(void *context, unsigned int reg, void *_val,
> +static int qfprom_reg_write(void *context, unsigned int reg, void void *_val,
>  			    size_t bytes)
>  {

[Severity: Low]
Does this cause a compilation failure?

The double void void declaration appears to be a syntax error that will break
the build when the Qualcomm QFPROM driver is enabled.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715175229.24672-1-linkmauve@linkmauve.fr?part=2



More information about the linux-amlogic mailing list