scsi: elx: efct: Remove redundant memset() statement
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Thu, 5 May 2022 14:36:57 +0000 (07:36 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 May 2022 00:16:26 +0000 (20:16 -0400)
As memset() of bmbx is immediately followed by a memcpy() where bmbx is the
destination, the memset() is redundant.

Link: https://lore.kernel.org/r/20220505143703.45441-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/elx/efct/efct_hw.c

index d4bb37960a3cf93ef018cd5081496bb1f836a918..5a5525054d71c89a66cbd1de95d941a7311bcb5c 100644 (file)
@@ -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) {