Re: [patch 1/2 -mm] flex_array: introduce DEFINE_FLEX_ARRAY

From: David Rientjes
Date: Wed Sep 02 2009 - 14:51:19 EST


On Wed, 2 Sep 2009, Dave Hansen wrote:

> This all looks pretty good. The only issue is that the macro name
> lengths have gotten a bit out of hand.
>
> For instance. This:
>
> #define FLEX_ARRAY_ELEMENTS_PER_PART(size) \
> (FLEX_ARRAY_PART_SIZE / size)
>
> ends up being longer in practice than just open-coding the operation:
>
> FLEX_ARRAY_ELEMENTS_PER_PART(fa->element_size)
>
> vs.
>
> (FLEX_ARRAY_PART_SIZE / fa->element_size)
>
> and the length also ends up making for a couple of pretty ugly line
> wraps.
>

Agreed, it's difficult to shorten because they need to be prefixed with
FLEX_ARRAY_ since they are global macros now that they've been included in
linux/flex_array.h.

> Otherwise, this is fine with me.
>
> Acked-by: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx>
>

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