public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache
Date: Fri, 15 Mar 2013 01:35:34 +0000	[thread overview]
Message-ID: <20130315013534.GF4931@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1363272755-6179-1-git-send-email-dp@opensource.wolfsonmicro.com>

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

On Thu, Mar 14, 2013 at 02:52:35PM +0000, Dimitris Papastamos wrote:

>  	if (rbnode) {
>  		reg_tmp = (reg - rbnode->base_reg) / map->reg_stride;
> +		/* Does this register exist?  If not bail out. */
> +		if (!(rbtree_ctx->reg_present[BIT_WORD(reg)] & BIT_MASK(reg)))
> +			return -ENOENT;
>  		*value = regcache_rbtree_get_register(map, rbnode, reg_tmp);

This means that every caller is going to need to have a check added to
see if the register is present which doesn't seem great, we should at
least have a function to do the check.  The check is fiddly enough.

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

  reply	other threads:[~2013-03-15  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 14:52 [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache Dimitris Papastamos
2013-03-15  1:35 ` Mark Brown [this message]
2013-03-15 11:14   ` Dimitris Papastamos

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=20130315013534.GF4931@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=dp@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