]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit833216754455019c18546b1a7e722718ae19509a
tree2cfc6ab613c9627e412b57900608bb9ed691d0bf
parentabcdd6c8386dd421ef6cc523ccb24f243ab49d84
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