[PATCH 31/43] drm/i915: Use kcalloc instead of kzalloc to allocate array

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

 



On Wed, Dec 14, 2011 at 10:57, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:

> From: Thomas Meyer <thomas at m3y3r.de>
>
> The advantage of kcalloc is, that will prevent integer overflows which
> could
> result from the multiplication of number of elements and size and it is
> also
> a bit nicer to read.
>
> The semantic patch that makes this change is available
> in https://lkml.org/lkml/2011/11/25/107
>
> Signed-off-by: Thomas Meyer <thomas at m3y3r.de>
> Signed-Off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>

It looks nicer indeed, so:

Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>

-- 
Eugeni Dodonov
<http://eugeni.dodonov.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20111214/730cb829/attachment.htm>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux