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

[email protected]
Newsgroups dev.linux.lists.mfd,dev.linux.lists.imx,dev.linux.lists.linux-sunxi,org.infradead.lists.linux-amlogic,org.kernel.vger.linux-rtc
Message-ID <[email protected]>
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 <[email protected]>

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/[email protected]?part=2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.