mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Ben Whitten <ben.whitten@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	nandor.han@vaisala.com
Subject: Re: [PATCH] regmap: fix writes to non incrementing registers
Date: Wed, 14 Aug 2019 17:19:38 +0100	[thread overview]
Message-ID: <20190814161938.GI4640@sirena.co.uk> (raw)
In-Reply-To: <CAF3==iuZvCnmAg9hqs8ivHw0wHaUQEf8k9U8=KTekMMjdyyEKg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

On Wed, Aug 14, 2019 at 02:09:11PM +0100, Ben Whitten wrote:

> So it appeared that the last patch in this area for validating a register
> block [1] broke the regmap_noinc_write use case.

Please include human readable descriptions of things like commits and
issues being discussed in e-mail in your mails, this makes them much
easier for humans to read especially when they have no internet access.
I do frequently catch up on my mail on flights or while otherwise
travelling so this is even more pressing for me than just being about
making things a bit easier to read.

> Because regmap_noinc_write calls _regmap_raw_write and in
> turn hits the _regmap_raw_write_impl, the val_len is the depth of the
> one register to write to and not a block of registers which is assumed
> by the previous check. By inserting a check that the first (and only)
> register is a noinc one allows me to start writing to my FIFO again.

> I'm all for an alternative solution though if there is a cleaner approach.

Like I said if we're checking for nonincrementing registers it shouldn't
just be on the first register, it should be for every address in the
range.  Probably accept it if the nonincrementing register is the first
and error otherwise, with some documentation explaining what's going on.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-08-14 16:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 21:22 Ben Whitten
2019-08-14 10:01 ` Mark Brown
2019-08-14 13:09   ` Ben Whitten
2019-08-14 13:32     ` Andreas Färber
2019-08-14 16:05       ` Mark Brown
2019-08-14 16:44         ` Andreas Färber
2019-08-14 16:19     ` Mark Brown [this message]
2019-09-03  9:42       ` Ben Whitten
2019-09-03 12:12         ` Mark Brown

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=20190814161938.GI4640@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=afaerber@suse.de \
    --cc=ben.whitten@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nandor.han@vaisala.com \
    --cc=rafael@kernel.org \
    /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

all inboxes | Powered by JetHome®