Re: [PATCH v2] nvmem: regmap: Fix nvmem size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 02, 2024 at 11:31:43AM +0100, Sascha Hauer wrote:
> On Wed, Dec 20, 2023 at 09:29:08AM +0100, Robin van der Gracht wrote:
> > We should add 1 to the max_register index since counting is zero based.
> > 
> > i.e. the stm32mp151 bsec has registers 0 - 95 with reg_stride 4.
> > Size should be (95 + 1) * 4 = 384 bytes otherwise we can't access bsec
> > register 95 (last one).
> > 
> > regmap_size_bytes() does take the +1 into account so we can use that.
> > 
> > Signed-off-by: Robin van der Gracht <robin@xxxxxxxxxxx>
> > ---
> > 
> > v2: Fix the size calculation in nvmem_regmap_read() as well.
> > 
> >  drivers/nvmem/regmap.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Applied, thanks

And un-applied again, see Ahmads patch

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux