mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Robin van der Gracht <robin@protonic.nl>
Cc: barebox@lists.infradead.org, michiel.schelfhout@protonic.nl
Subject: Re: [PATCH v2] nvmem: regmap: Fix nvmem size
Date: Tue, 2 Jan 2024 11:53:30 +0100	[thread overview]
Message-ID: <20240102105330.GA1318922@pengutronix.de> (raw)
In-Reply-To: <20240102103143.GZ1318922@pengutronix.de>

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@protonic.nl>
> > ---
> > 
> > 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 |



      reply	other threads:[~2024-01-02 10:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20  8:29 Robin van der Gracht
2023-12-20  9:00 ` Ahmad Fatoum
2023-12-20 12:38   ` Robin van der Gracht
2023-12-21 14:02     ` Ahmad Fatoum
2024-01-02 17:03       ` Ahmad Fatoum
2024-01-02 10:31 ` Sascha Hauer
2024-01-02 10:53   ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102105330.GA1318922@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=michiel.schelfhout@protonic.nl \
    --cc=robin@protonic.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox