Skip to content

Commit

Permalink
staging: lustre: Cocci spatch "noderef"
Browse files Browse the repository at this point in the history
sizeof when applied to a pointer typed expression gives the size of the
pointer.
Found by coccinelle spatch "misc/noderef.cocci"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Thomas Meyer authored and Greg Kroah-Hartman committed Sep 25, 2013
1 parent 4a10c2a commit 430b849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/obdecho/echo_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
if (nob > ulsm_nob)
return (-EINVAL);

if (copy_to_user (ulsm, lsm, sizeof(ulsm)))
if (copy_to_user (ulsm, lsm, sizeof(*ulsm)))
return (-EFAULT);

for (i = 0; i < lsm->lsm_stripe_count; i++) {
Expand Down

0 comments on commit 430b849

Please sign in to comment.