linux/drivers/scsi/mpt2sas
Julia Lawall 96a99501d6 [SCSI] mpt2sas: 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: James Bottomley <JBottomley@Parallels.com>
2011-09-22 15:13:12 +04:00
..
mpi
Kconfig
Makefile
mpt2sas_base.c
mpt2sas_base.h [SCSI] mpt2sas: Bump driver version 09.100.00.01 2011-09-22 15:09:26 +04:00
mpt2sas_config.c
mpt2sas_ctl.c
mpt2sas_ctl.h
mpt2sas_debug.h
mpt2sas_scsih.c
mpt2sas_transport.c [SCSI] mpt2sas: take size of pointed value, not pointer 2011-09-22 15:13:12 +04:00