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] regmap: Cut down on the average # of nodes in the rbtree cache
Date: Wed, 13 Mar 2013 12:01:33 +0000 [thread overview]
Message-ID: <20130313120133.GN25610@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1363175623-2716-1-git-send-email-dp@opensource.wolfsonmicro.com>
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
On Wed, Mar 13, 2013 at 11:53:43AM +0000, Dimitris Papastamos wrote:
> + for (bitmap_size = 0, i = 0; i < map->num_reg_defaults; i++)
> + if (map->reg_defaults[i].reg > bitmap_size)
> + bitmap_size = map->reg_defaults[i].reg;
> + bitmap_size++;
> +
> + reg_bitmap = kmalloc(BITS_TO_LONGS(bitmap_size) * sizeof(long),
> + GFP_KERNEL);
> + if (!reg_bitmap) {
> + ret = -ENOMEM;
> + goto err;
> + }
> + bitmap_zero(reg_bitmap, bitmap_size);
> + rbtree_ctx->reg_bitmap = reg_bitmap;
> + rbtree_ctx->reg_bitmap_nbits = bitmap_size;
> +
What happens if we don't have any register defaults?
This also needs a clearer name reflecting the function rather than the
type of the data.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-03-13 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 11:53 [PATCH] regmap: Cut down on the average # of nodes in the rbtree cache Dimitris Papastamos
2013-03-13 12:01 ` Mark Brown [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=20130313120133.GN25610@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