Re: [PATCH 0/8] nvmem: make reg_write() take a const void *
From: Andy Shevchenko
Date: Wed Jul 15 2026 - 15:03:17 EST
On Wed, Jul 15, 2026 at 07:52:16PM +0200, Link Mauve wrote:
> This callback used to take a mutable void * for no reason, which causes
> the compiler to be unaware that the val buffer should never be modified
> by the callback.
>
> This was found while drafting the nvmem-provider Rust abstraction.
>
> I’ve split this series based on the subsystem each patch affects, but I
> think it should go through the nvmem tree in one go after gathering the
> acks from the other subsystem maintainers.
It's an option. The other option (and often we go this way) is to introduce
a new name, convert users, convert the name back.
See, for example, how GPIO subsystem changed a proto of .set() callback.
> I’ve been told previously to not include too many maintainers in Cc, but
> I don’t know which ones to remove from the get_maintainers.pl output, so
> I’ve still included everyone, sorry about that.
With this, rather standard, way you will fulfill the above requirement
automatically. Also you won't need treewide change to bother everybody
with this. And also increase the chances to go in (maybe in a few releases
span).
--
With Best Regards,
Andy Shevchenko