dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/staging/dream
Julia Lawall 7a6cb0d549 Staging: Use kcalloc or kzalloc
Use kcalloc or kzalloc rather than the combination of kmalloc and memset.

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

// <smpl>
@@
expression x,y,flags;
statement S;
type T;
@@

x =
-   kmalloc
+   kcalloc
           (
-           y * sizeof(T),
+           y, sizeof(T),
                flags);
 if (x == NULL) S
-memset(x, 0, y * sizeof(T));

@@
expression x,size,flags;
statement S;
@@

-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
 if (x == NULL) S
-memset(x, 0, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
2010-05-14 14:02:56 -07:00
..
camera staging: trivial: fix typo "seperate" 2010-05-14 13:16:10 -07:00
include Staging: dream: add missing include files 2010-03-03 16:42:26 -08:00
qdsp5 Staging: dream: remove last bits of earlysuspend support 2010-05-11 11:35:37 -07:00
Kconfig staging: dream: smd: remove all smd related code 2010-05-14 13:21:30 -07:00
Makefile staging: dream: smd: remove all smd related code 2010-05-14 13:21:30 -07:00
TODO Staging: dream: remove last bits of earlysuspend support 2010-05-11 11:35:37 -07:00
generic_gpio.c Staging: dream: add gpio and pmem support 2009-12-11 12:23:21 -08:00
gpio_axis.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
gpio_event.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
gpio_input.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
gpio_matrix.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
gpio_output.c Staging: dream: add support for input on GPIO pins 2009-09-15 12:02:05 -07:00
pmem.c Staging: Use kcalloc or kzalloc 2010-05-14 14:02:56 -07:00
synaptics_i2c_rmi.c Staging: dream: Synaptic: Add threaded IRQ support 2010-05-11 11:35:45 -07:00
synaptics_i2c_rmi.h Staging: HTC Dream: touchscreen driver for staging 2009-09-15 12:02:04 -07:00