drivers/staging/mei/interface.c: take size of pointed value, not pointer
authorJulia Lawall <julia@diku.dk>
Fri, 16 Sep 2011 06:57:33 +0000 (08:57 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 18:49:18 +0000 (20:49 +0200)
commitc0569981b343a8cb848852a3ebd68bc07b64d873
treea1810fa80f2dddf1616578ddaab3713e5feaf0dd
parent661d3bf652c0b8eca6f40f2e308b5a719307dd56
drivers/staging/mei/interface.c: take size of pointed value, not pointer

Sizeof a pointer-typed expression returns the size of the pointer, not that
of the pointed data.

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

// <smpl>
@@
expression *e;
type T;
identifier f;
@@

f(...,(T)e,...,
-sizeof(e)
+sizeof(*e)
,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/mei/interface.c