drivers/gpu: Use kzalloc for allocating only one thing
authorJulia Lawall <julia@diku.dk>
Sat, 19 Dec 2009 07:16:33 +0000 (08:16 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 23 Dec 2009 00:04:02 +0000 (10:04 +1000)
commite265f39e1ff026dcc787f1953c048f3de5aefd16
tree2cfc6ab613c9627e412b57900608bb9ed691d0bf
parent01136acff8cc8251822fbae77f11e8029049c6f1
drivers/gpu: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The use of the allocated memory that looks like an array is &p->relocs[0],
but this should be the same as p->relocs.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600_cs.c