[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130315013534.GF4931@opensource.wolfsonmicro.com>
Date:	Fri, 15 Mar 2013 01:35:34 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
Cc:	patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regmap: Cut down on the average # of nodes in the
 rbtree cache
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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists