Hi,
This patch fixes what I think is a bug in regcache_rbtree_sync().
It is something I noticed when reading the code, I don't have a test
scenario for it. So please review it carefully.
Bye,
Maarten
A node starting before the minimum register is no reason to reject it,
since its end could be in range. The check for the end already exists
two lines lower, so we can just remove the incorrect check.
Signed-off-by: Maarten ter Huurne <[email protected]>
---
drivers/base/regmap/regcache-rbtree.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index 79f4fca..bd57ed4 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -385,8 +385,6 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
for (node = rb_first(&rbtree_ctx->root); node; node = rb_next(node)) {
rbnode = rb_entry(node, struct regcache_rbtree_node, node);
- if (rbnode->base_reg < min)
- continue;
if (rbnode->base_reg > max)
break;
if (rbnode->base_reg + rbnode->blklen < min)
--
1.7.10.4
On Fri, May 31, 2013 at 04:45:13PM +0200, Maarten ter Huurne wrote:
> A node starting before the minimum register is no reason to reject it,
> since its end could be in range. The check for the end already exists
> two lines lower, so we can just remove the incorrect check.
Applied, thanks.