aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-03-09 16:14:34 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 10:23:30 -0400
commite05a9e7b18dfcce6911d0b901d7f04387cc1d93c (patch)
tree672286c193a021a2d2f6fb9d83014a04a7141d5d
parent1278b11f46d9f34097f44ecc417148f27e8997fe (diff)
[SCSI] pm8001: drop redundant memset
The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2,e3,e4; @@ - memset(e1,e2,e3); memcpy(e1,e4,e3); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/pm8001/pm8001_hwi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 909c00ec044f..5ff8261c5d67 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -4390,7 +4390,6 @@ pm8001_chip_fw_flash_update_req(struct pm8001_hba_info *pm8001_ha,
4390 return -ENOMEM; 4390 return -ENOMEM;
4391 } 4391 }
4392 } 4392 }
4393 memset(buffer, 0, fw_control->len);
4394 memcpy(buffer, fw_control->buffer, fw_control->len); 4393 memcpy(buffer, fw_control->buffer, fw_control->len);
4395 flash_update_info.sgl.addr = cpu_to_le64(phys_addr); 4394 flash_update_info.sgl.addr = cpu_to_le64(phys_addr);
4396 flash_update_info.sgl.im_len.len = cpu_to_le32(fw_control->len); 4395 flash_update_info.sgl.im_len.len = cpu_to_le32(fw_control->len);