staging: rtl8712: replace kmalloc(..., sizeof(T))
authorVitaly Osipov <vitaly.osipov@gmail.com>
Sat, 14 Jun 2014 11:47:21 +0000 (21:47 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 23:44:06 +0000 (16:44 -0700)
commitbd9dc62c365c0a6cf12d571ec0a2f10218a30c81
treeb14a9f53f0655090a9192b7431b02211bfd12041
parent3ae70746d0569dd942cedd668f3a4a256c06fbe8
staging: rtl8712: replace kmalloc(..., sizeof(T))

As suggested by Andy Shevchenko on driverdev-devel, replace
v = ... sizeof(struct type_of_v) -> sizeof(*v)

Based on a cocci patch along the lines of

@@
type T;
expression E;
identifier V;
@@

T *V;
...
- V = kmalloc(sizeof(T), E);
+ V = kmalloc(sizeof(*V), E);

@@
type T;
expression E;
identifier V;
@@

T *V;
...
- V = kzalloc(sizeof(T), E);
+ V = kzalloc(sizeof(*V), E);

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_cmd.c
drivers/staging/rtl8712/rtl871x_io.c
drivers/staging/rtl8712/rtl871x_mlme.c
drivers/staging/rtl8712/rtl871x_mp.c