Re: [PATCH 3/5] drivers/scsi : Correct the size argument to kmalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-12-29 at 21:04 +0100, Julia Lawall wrote:
> On Tue, 29 Dec 2009, Rolf Eike Beer wrote:
> > Julia Lawall wrote:
> > > From: Julia Lawall <julia@xxxxxxx>
> > > In each case, the destination of the allocation has type struct **, so the
> > > elements of the array should have pointer type, not structure type.
> > Maybe they should even by kcalloc'ed?
> I thought about that, but in response to another patch someone seemed to 
> think kcalloc was not very useful.  But I can certainly change it in this 
> case.

I think kcalloc is useful and should be used when the
allocated array of elements needs to be zeroed.

It appears the uses in 1/5 and 3/5 don't need it but
maybe patch 2/5 and 4/5 should use kcalloc.


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux