Skip to content

Commit 9000f66

Browse files
Chen Nimartinkpetersen
authored andcommitted
scsi: fnic: Replace memset() with eth_zero_addr()
Use eth_zero_addr() to assign the zero address to the given address array instead of memset() when second argument is address of zero. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20250519085457.918720-1-nichen@iscas.ac.cn Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 8f9c938 commit 9000f66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/scsi/fnic/fip.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void fnic_fcoe_start_fcf_discovery(struct fnic *fnic)
200200
return;
201201
}
202202

203-
memset(iport->selected_fcf.fcf_mac, 0, ETH_ALEN);
203+
eth_zero_addr(iport->selected_fcf.fcf_mac);
204204

205205
pdisc_sol = (struct fip_discovery *) frame;
206206
*pdisc_sol = (struct fip_discovery) {
@@ -588,12 +588,12 @@ void fnic_common_fip_cleanup(struct fnic *fnic)
588588
if (!is_zero_ether_addr(iport->fpma))
589589
vnic_dev_del_addr(fnic->vdev, iport->fpma);
590590

591-
memset(iport->fpma, 0, ETH_ALEN);
591+
eth_zero_addr(iport->fpma);
592592
iport->fcid = 0;
593593
iport->r_a_tov = 0;
594594
iport->e_d_tov = 0;
595-
memset(fnic->iport.fcfmac, 0, ETH_ALEN);
596-
memset(iport->selected_fcf.fcf_mac, 0, ETH_ALEN);
595+
eth_zero_addr(fnic->iport.fcfmac);
596+
eth_zero_addr(iport->selected_fcf.fcf_mac);
597597
iport->selected_fcf.fcf_priority = 0;
598598
iport->selected_fcf.fka_adv_period = 0;
599599
iport->selected_fcf.ka_disabled = 0;

0 commit comments

Comments
 (0)