Re: [PATCH RFC v2] slab: introduce kmalloc_array

From: Xi Wang
Date: Fri Feb 10 2012 - 09:09:18 EST


On Feb 10, 2012, at 8:58 AM, Alexey Dobriyan wrote:
> No,
>
> If one dimension is constant, limit should be divided by it, so
> compiler would have less chance
> to screw up compile time evaluation.

I think the BUILD_BUG_ON macro can prevent that misuse.

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