mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: Re: [RFC][PATCH] regmap: make REGCACHE_NONE maps return error on regcache_sync
Date: Fri, 8 May 2015 11:20:19 +0100	[thread overview]
Message-ID: <20150508102019.GX22845@sirena.org.uk> (raw)
In-Reply-To: <20150508095537.GA15394@opensource.wolfsonmicro.com>

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

On Fri, May 08, 2015 at 10:55:37AM +0100, Nariman Poushin wrote:
> Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
> ---
>  regcache currently causes a BUG_ON if cache_sync/sync_region is
>  called on a map with cache_type REGCACHE_NONE. This is not
>  consistent with the behaviour of regcache_read/write which
>  currently just return -ENOSYS and only throws a BUG_ON if
>  the cache_type is something that _should_ have cache ops,
>  but doesn't. Sure your device might not work, it but doesn't
>  seem right to panic the kernel. The other option I suppose
>  is to change it to a WARN_ON.

Please submit patches in the format covered in SubmittingPatches, the
changelog goes before the signoff.  

The reason this is so loud is that while it's reasonable that generic
code could end up triggering a write it's difficult to see any way in
which a sync could be triggered on a device without a cache without it
being an obvious bug.  Since people frequently don't bother checking
return codes loud log messages are our only real way of reporting this,
given where syncs tend to happen it's not likely to happen in an obscure
code path that won't get seen.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-05-08 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08  9:55 Nariman Poushin
2015-05-08 10:20 ` Mark Brown [this message]
2015-05-08 10:34   ` Nariman Poushin
2015-06-08 14:16     ` Nariman Poushin
2015-06-08 17:24       ` 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=20150508102019.GX22845@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nariman@opensource.wolfsonmicro.com \
    --cc=patches@opensource.wolfsonmicro.com \
    /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

Powered by JetHome