From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: andrey.smirnov@convergeddevices.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] [regmap] [RESEND] Add "no-bus" option for regmap API
Date: Mon, 14 Jan 2013 08:18:37 +0900 [thread overview]
Message-ID: <20130113231836.GJ5041@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1358024054-9895-4-git-send-email-andrew.smirnov@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
On Sat, Jan 12, 2013 at 12:54:14PM -0800, Andrey Smirnov wrote:
> + bool cache_registers;
> +
I'm afraid I don't quite understand this...
> - if (!map->cache_bypass && map->format.format_write) {
> + if (!map->cache_bypass && map->cache_registers) {
> ret = regcache_write(map, reg, val);
...I think it's mostly to service this check here, but looking at the
code I can't quite think why the code is doing what it's doing - I
suspect we should just remove the check for format_write() here. I
think it was there to support potential bulk writes from the cache code
(which we don't do yet) but we're not actually doing those and it's not
clear that this should be doing that anyway.
> int ret;
> + void *context = (map->bus) ? map : map->bus_context;
> +
Can you please make this a static inline regmap_map_get_context() or
something? The same thing appears in quite a few places and the terery
operator isn't great at the best of times.
Otherwise this looks good, thanks a lot for doing this.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-01-13 23:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 20:54 [PATCH 0/3] [regmap] [RESEND] Add "no-bus" configuration for regmap API Andrey Smirnov
2013-01-12 20:54 ` [PATCH 1/3] [regmap] [RESEND] Add provisions to have user-defined read operation Andrey Smirnov
2013-01-13 23:04 ` Mark Brown
2013-01-12 20:54 ` [PATCH 2/3] [regmap] [RESEND] Add provisions to have user-defined write operation Andrey Smirnov
2013-01-13 23:04 ` Mark Brown
2013-01-12 20:54 ` [PATCH 3/3] [regmap] [RESEND] Add "no-bus" option for regmap API Andrey Smirnov
2013-01-13 23:18 ` Mark Brown [this message]
2013-01-14 17:08 ` Andrey Smirnov
2013-01-15 7:02 ` Mark Brown
2013-01-13 12:03 ` [PATCH 0/3] [regmap] [RESEND] Add "no-bus" configuration " 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=20130113231836.GJ5041@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=andrew.smirnov@gmail.com \
--cc=andrey.smirnov@convergeddevices.net \
--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;
as well as URLs for NNTP newsgroup(s).