Re: [PATCH v3] regmap: debugfs: Add a registers `range' file

From: Dimitris Papastamos
Date: Fri Feb 08 2013 - 07:50:44 EST


On Fri, Feb 08, 2013 at 11:46:55AM +0000, Mark Brown wrote:
> On Fri, Feb 01, 2013 at 12:05:39PM +0000, Dimitris Papastamos wrote:
>
> > +struct regmap_reg_range {
> > + unsigned int start;
> > + unsigned int end;
> > + unsigned int attr;
> > +};
>
> > + i = start_reg;
> > + while (i <= map->max_register) {
> > + reg_attr = regmap_attr_bitmap(map, i);
> > + switch (state) {
>
> We're doing a linear scan through the entire register map here in order
> to build up a list of which registers exist, doing it every time the
> file is read. This data structure looks *very* like the one we have for
> the reads themselves, it seems like we should be sharing the work here
> and using the same cache.

Yea that's true. Will fix this and re-send.

Thanks,
Dimitris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/