diff mbox series

scsi: elx: efct: Remove redundant memset statement

Message ID 20220505143703.45441-1-harshit.m.mogalapalli@oracle.com (mailing list archive)
State Accepted
Headers show
Series scsi: elx: efct: Remove redundant memset statement | expand

Commit Message

Harshit Mogalapalli May 5, 2022, 2:36 p.m. UTC
As memset of 'bmbx' is immediately followed by a memcpy where 'bmbx'
is the destination, memset is redundant.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
 drivers/scsi/elx/efct/efct_hw.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Martin K. Petersen May 17, 2022, 2:13 a.m. UTC | #1
Harshit,

> As memset of 'bmbx' is immediately followed by a memcpy where 'bmbx'
> is the destination, memset is redundant.

Applied to 5.19/scsi-staging, thanks!
Martin K. Petersen May 20, 2022, 1:09 a.m. UTC | #2
On Thu, 5 May 2022 07:36:57 -0700, Harshit Mogalapalli wrote:

> As memset of 'bmbx' is immediately followed by a memcpy where 'bmbx'
> is the destination, memset is redundant.
> 
> 

Applied to 5.19/scsi-queue, thanks!

[1/1] scsi: elx: efct: Remove redundant memset statement
      https://git.kernel.org/mkp/scsi/c/e79aaa9cc02d
diff mbox series

Patch

diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c
index d4bb37960a3c..5a5525054d71 100644
--- a/drivers/scsi/elx/efct/efct_hw.c
+++ b/drivers/scsi/elx/efct/efct_hw.c
@@ -1402,7 +1402,6 @@  efct_hw_command(struct efct_hw *hw, u8 *cmd, u32 opts, void *cb, void *arg)
 		mutex_lock(&hw->bmbx_lock);
 		bmbx = hw->sli.bmbx.virt;
 
-		memset(bmbx, 0, SLI4_BMBX_SIZE);
 		memcpy(bmbx, cmd, SLI4_BMBX_SIZE);
 
 		if (sli_bmbx_command(&hw->sli) == 0) {