CodingStyle: "kzalloc()" versus "kcalloc(1,...)"

2006-12-07 Thread Robert P. J. Day
i just noticed that there are numerous invocations of kcalloc() where the hard-coded first arg of # elements is "1", which seems like an inappropriate use of kcalloc(). the only rationale i can see is that kcalloc() guarantees that the memory will be set to zero, so i'm guessing that this for

Re: CodingStyle: "kzalloc()" versus "kcalloc(1,...)"

2006-12-13 Thread Adrian Bunk
On Thu, Dec 07, 2006 at 07:16:15PM -0500, Robert P. J. Day wrote: > > i just noticed that there are numerous invocations of kcalloc() > where the hard-coded first arg of # elements is "1", which seems like > an inappropriate use of kcalloc(). > > the only rationale i can see is that kcalloc()