Re: [RFCv2][PATCH] flexible array implementation

From: Dave Hansen
Date: Wed Jul 22 2009 - 11:03:13 EST


On Wed, 2009-07-22 at 15:09 +0800, Amerigo Wang wrote:
> On Tue, Jul 21, 2009 at 03:00:17PM -0700, Dave Hansen wrote:
> >+static inline int __nr_part_ptrs(void)
>
> How about __nr_ptrs_in_part()?

That would be fine except it is the number of part pointers in the base.
I guess you're proving that I named it horribly. :)

> >+static int fa_index_inside_part(struct flex_array *fa, int element_nr)
> >+{
> >+ return (element_nr % __elements_per_part(fa->element_size));
> >+}
> >+
> >+static int offset_inside_part(struct flex_array *fa, int element_nr)
>
> How about index_in_part()?

Yeah, I guess that's decent. I'll go see how it feels when it gets
used.

-- Dave

--
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/