git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12b8fc1
)
[SCSI] mpt2sas: take size of pointed value, not pointer
author
Julia Lawall
<julia@diku.dk>
Fri, 16 Sep 2011 06:57:34 +0000
(08:57 +0200)
committer
James Bottomley
<JBottomley@Parallels.com>
Thu, 22 Sep 2011 11:13:12 +0000
(15:13 +0400)
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>
drivers/scsi/mpt2sas/mpt2sas_transport.c
patch
|
blob
|
history
diff --cc
drivers/scsi/mpt2sas/mpt2sas_transport.c
Simple merge