[PATCH v2 0/2] nvmem: fix a const-unsoundness in reg_write

Link Mauve linkmauve at linkmauve.fr
Thu Jul 16 04:29:44 PDT 2026


On Thu, Jul 16, 2026 at 12:03:17PM +0300, Andy Shevchenko wrote:
[…]
> ..... TL;DR: you should fix the Apple driver (and might more if any of them
> use that dirty trick).

It was the only one of the drivers/nvmem/ to do that.  Three other
drivers use a pattern where they merge read and write operations into a
single access function with a type=read/write parameter, so const safety
can’t work there and I’ll continue casting from const void * to void *
in the write function to keep that pattern working.

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

-- 
Link Mauve



More information about the linux-amlogic mailing list