[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201222133433.20023-1-zhengyongjun3@huawei.com>
Date: Tue, 22 Dec 2020 21:34:33 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] scsi: bfa: Remove unnecessary memset
memcpy operation is next to memset code, and the size to copy is equals to the size to
memset, so the memset operation is unnecessary, remove it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
drivers/scsi/bfa/bfa_ioc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 325ad8a592bb..8d808ca2ec20 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -2748,7 +2748,6 @@ bfa_ioc_get_type(struct bfa_ioc_s *ioc)
void
bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num)
{
- memset((void *)serial_num, 0, BFA_ADAPTER_SERIAL_NUM_LEN);
memcpy((void *)serial_num,
(void *)ioc->attr->brcd_serialnum,
BFA_ADAPTER_SERIAL_NUM_LEN);
--
2.22.0
Powered by blists - more mailing lists