From: Mark Brown <broonie@kernel.org>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] regmap: cache: Do not panic for REGCACHE_NONE regmap
Date: Fri, 10 Mar 2023 14:21:10 +0000 [thread overview]
Message-ID: <ZAs81tPqVruM4eAL@sirena.org.uk> (raw)
In-Reply-To: <2399331.NgBsaNRSFp@steina-w>
[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]
On Fri, Mar 10, 2023 at 02:35:13PM +0100, Alexander Stein wrote:
> Am Freitag, 10. März 2023, 14:02:13 CET schrieb Mark Brown:
> > Why would we be trying to do a regcache_sync() on a device with
> > no cache?
> Indeed, that makes no sense. That's indicating a bug in a driver, but why do
> we need to panic the kernel in this case?
You're trying to change this to silently ignore the call which
isn't going to make anything happy.
> On the other hand the same question applies to other regcache related
> functions currently checking for non-cached maps. There is no common
> behaviour:
> panic:
> * regcache_sync
> * regcache_sync_region
These are only ever triggered from a client driver, nothing in
regmap will ever sync the regmap without being explicitly asked
to.
> returning -ENOSYS:
> * regcache_read
> returning success (0):
> * regcache_write
> early return (void return value):
> * regcache_exit
These are all called transparently as part of the regmap core
regardless of if there is a cache, users never directly read or
write values to the cache.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-03-10 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 7:39 [PATCH 1/2] regmap: cache: Do not panic for REGCACHE_NONE regmap Alexander Stein
2023-03-10 7:39 ` [PATCH 2/2] regmap: cache: Fix return value Alexander Stein
2023-03-10 13:02 ` [PATCH 1/2] regmap: cache: Do not panic for REGCACHE_NONE regmap Mark Brown
2023-03-10 13:35 ` Alexander Stein
2023-03-10 14:21 ` Mark Brown [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=ZAs81tPqVruM4eAL@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alexander.stein@ew.tq-group.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--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