From: Xiubo Li <lixiubo@cmss.chinamobile.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: broonie@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regmap: cache: Add warning info for the cache check
Date: Fri, 11 Dec 2015 09:11:15 +0800 [thread overview]
Message-ID: <566A22B3.3040904@cmss.chinamobile.com> (raw)
In-Reply-To: <20151210124535.GO6058@localhost.localdomain>
On 10/12/2015 20:45, Charles Keepax wrote:
> On Thu, Dec 10, 2015 at 10:40:53AM +0800, Xiubo Li wrote:
>> If there is no cache used for the drivers, the register drfaults
> s/drfaults/defaults/
Yes,Thanks.
>> are not need any more. This patch will check this and print a
>> warning.
>>
>> Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
>> ---
>> drivers/base/regmap/regcache.c | 12 ++++++++----
>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
>> index 1c0210a..bdcd401 100644
>> --- a/drivers/base/regmap/regcache.c
>> +++ b/drivers/base/regmap/regcache.c
>> @@ -100,15 +100,19 @@ int regcache_init(struct regmap *map, const struct regmap_config *config)
>> int i;
>> void *tmp_buf;
>>
>> - for (i = 0; i < config->num_reg_defaults; i++)
>> - if (config->reg_defaults[i].reg % map->reg_stride)
>> - return -EINVAL;
>> -
>> if (map->cache_type == REGCACHE_NONE) {
>> + if (config->num_reg_defaults)
>> + dev_warn(map->dev,
>> + "No cache used with register defualts set!\n");
> s/defualts/defaults/
See the next version.
Thanks,
BRs
Xiubo
> Thanks,
> Charles
prev parent reply other threads:[~2015-12-11 1:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 2:40 [PATCH] regmap: cache: Add warning info for the cache check Xiubo Li
2015-12-10 12:45 ` Charles Keepax
2015-12-11 1:11 ` Xiubo Li [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=566A22B3.3040904@cmss.chinamobile.com \
--to=lixiubo@cmss.chinamobile.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.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