Tag: 96a99501d6ba0292ea7bd96846053091fc20776c

[SCSI] mpt2sas: take size of pointed value, not pointer

Author: Julia Lawall <julia@diku.dk> 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/) // @@ expression *e; type T; identifier f; @@ f(…,(T)e,…, -sizeof(e) +sizeof(*e) ,…) // Signed-off-by: Julia Lawall Signed-off-by: James Bottomley — drivers/scsi/mpt2sas/mpt2sas_transport.c | 2 …

Continue reading