mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[SCSI] esas2r: coccinelle - Replace memcpy with struct assignment
Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Bradley Grove <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
8d3ac48408
commit
ef11851b34
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue