Messages in this thread | | | Date | Sat, 11 Feb 2012 15:19:23 +0300 | From | Alexey Dobriyan <> | Subject | Re: [PATCH RFC v2] slab: introduce kmalloc_array |
| |
On Fri, Feb 10, 2012 at 09:09:09AM -0500, Xi Wang wrote: > 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.
But there is no misuse.
Both kaalloc(non-const, const) and kaalloc(const, non-const) are OK. It's just first case happens more often.
| |