public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regmap: Warn on raw I/O as well as bulk reads that bypass cache
Date: Mon, 10 Oct 2011 10:01:17 +0100	[thread overview]
Message-ID: <20111010090117.GB2563@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1318167534-16479-1-git-send-email-broonie@opensource.wolfsonmicro.com>

On Sun, Oct 09, 2011 at 02:38:54PM +0100, Mark Brown wrote:
> As with the bulk reads we really should be able to make these play
> nicely with the cache but warn for now.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/base/regmap/regmap.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index d786ddc..85bffdd 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -377,6 +377,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
>  {
>  	int ret;
>  
> +	WARN_ON(map->cache_type != REGCACHE_NONE);
> +
>  	mutex_lock(&map->lock);
>  
>  	ret = _regmap_raw_write(map, reg, val, val_len);
> @@ -481,6 +483,8 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
>  {
>  	int ret;
>  
> +	WARN_ON(map->cache_type != REGCACHE_NONE);
> +
>  	mutex_lock(&map->lock);
>  
>  	ret = _regmap_raw_read(map, reg, val, val_len);
> -- 
> 1.7.6.3

All of them look good.

Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>

      reply	other threads:[~2011-10-10  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09 13:38 [PATCH] regmap: Warn on raw I/O as well as bulk reads that bypass cache Mark Brown
2011-10-10  9:01 ` Dimitris Papastamos [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=20111010090117.GB2563@opensource.wolfsonmicro.com \
    --to=dp@opensource.wolfsonmicro.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --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