summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r
diff options
context:
space:
mode:
authorBradley Grove <bgrove@attotech.com>2013-08-29 15:55:44 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-09-06 11:13:54 -0700
commitef11851b34b3a6b91b7d09b4711a10a0ad39c316 (patch)
treed761e5665a11b9c9f48873829fd49166ef9db0ca /drivers/scsi/esas2r
parent8d3ac484089aee9b1bd700af59017d685ae4803b (diff)
downloadlinux-ef11851b34b3a6b91b7d09b4711a10a0ad39c316.tar.bz2
[SCSI] esas2r: coccinelle - Replace memcpy with struct assignment
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/esas2r')
-rw-r--r--drivers/scsi/esas2r/esas2r_flash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/esas2r/esas2r_flash.c b/drivers/scsi/esas2r/esas2r_flash.c
index 45e353f9616b..2ec3c23275b8 100644
--- a/drivers/scsi/esas2r/esas2r_flash.c
+++ b/drivers/scsi/esas2r/esas2r_flash.c
@@ -1360,7 +1360,7 @@ void esas2r_nvram_set_defaults(struct esas2r_adapter *a)
u32 time = jiffies_to_msecs(jiffies);
esas2r_lock_clear_flags(&a->flags, AF_NVR_VALID);
- memcpy(n, &default_sas_nvram, sizeof(struct esas2r_sas_nvram));
+ *n = default_sas_nvram;
n->sas_addr[3] |= 0x0F;
n->sas_addr[4] = HIBYTE(LOWORD(time));
n->sas_addr[5] = LOBYTE(LOWORD(time));
@@ -1378,7 +1378,7 @@ void esas2r_nvram_get_defaults(struct esas2r_adapter *a,
* address out first.
*/
memcpy(&sas_addr[0], a->nvram->sas_addr, 8);
- memcpy(nvram, &default_sas_nvram, sizeof(struct esas2r_sas_nvram));
+ *nvram = default_sas_nvram;
memcpy(&nvram->sas_addr[0], &sas_addr[0], 8);
}