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

Andy Shevchenko <[email protected]> Thu, 16 Jul 2026 20:48:58 +0300
Newsgroups dev.linux.lists.asahi,dev.linux.lists.imx,org.infradead.lists.linux-amlogic,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Thu, Jul 16, 2026 at 01:07:26PM +0200, Link Mauve wrote:
> On Thu, Jul 16, 2026 at 12:03:17PM +0300, Andy Shevchenko wrote:
> > On Wed, Jul 15, 2026 at 09:55:16PM +0200, Link Mauve wrote:

...

> I’ve attached a patch fixing this particular issue, I will include it in
> my v3 if that’s ok with you (or it could go as a different series, I
> don’t care much).

Works for me.

> I think I’ve found another bug in that driver, it says .max_register =
> 0xffff but .size = 0xffff, one or the other is probably off-by-one, and
> I suspect .size should be 0x10000 instead.

Yeah, max_register means offset of the last _accessible_ register.
So, 0xffff sounds about right there. As for size being 0xffff, I weakly
remember that there was a discussion about these values. Can you dig the
lore archive?

-- 
With Best Regards,
Andy Shevchenko