From patchwork Thu May 5 14:32:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshit Mogalapalli X-Patchwork-Id: 570154 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69E30C433EF for ; Thu, 5 May 2022 14:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380677AbiEEOgU (ORCPT ); Thu, 5 May 2022 10:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380673AbiEEOgP (ORCPT ); Thu, 5 May 2022 10:36:15 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 704671139; Thu, 5 May 2022 07:32:36 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 245DEWZR018680; Thu, 5 May 2022 14:32:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2021-07-09; bh=Z3S90r2GLlYLqCNlWjx2CN56QmSsTHewmNlX2T9VwUA=; b=k7XStwPm0VxCNKSlpKLwVigpJo0g2IMRb0CE+m/CdmZri8LQ4TCP+SO9bs5Hv27OekfG 1pkKFukqM+sgCyg207/FhDcdveUa0qgYdWb9zEKmOFGwy77PMbeAFgKPloftTgOn0eGq qZT128gB+/jkM/RIaJAR76Uu5AwOfa2EdkGerDjrwSW8o1OOu1GKi0haeDBopT5vtD8H wXfXKEhQrAX5OklsUXaXHcqK0cNpRMCHsJ0zfPEZtjed97V0+g6oZeCrWGmN4+I4Ircz HI55z2kB2Ja+fJ6BniHeik2sgaghA2iR2bHSHWWXM3YSs6tXb3pYLVfstwHLKuuHH0GP Sw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3frwntbkr5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 May 2022 14:32:34 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 245EOxvT030630; Thu, 5 May 2022 14:32:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3frujau3fd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 May 2022 14:32:31 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 245EWVOe011942; Thu, 5 May 2022 14:32:31 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.147.25.63]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3frujau3eq-1; Thu, 05 May 2022 14:32:31 +0000 From: Harshit Mogalapalli Cc: harshit.m.mogalapalli@oracle.com, dan.carpenter@oracle.com, Kashyap Desai , Sumit Saxena , Shivasharan S , "James E.J. Bottomley" , "Martin K. Petersen" , megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: megaraid_sas: Remove redundant memset statement Date: Thu, 5 May 2022 07:32:13 -0700 Message-Id: <20220505143214.44908-1-harshit.m.mogalapalli@oracle.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: yW8qSOWDB0ask78pQkMqAoP4ViIFsmAt X-Proofpoint-GUID: yW8qSOWDB0ask78pQkMqAoP4ViIFsmAt To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org As memset of 'scmd->sense_buffer' is immediately followed by a memcpy where 'scmd->sense_buffer' is the destination, memset is redundant. Signed-off-by: Harshit Mogalapalli --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 54fde2661952..5b5885d9732b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -2047,8 +2047,6 @@ map_cmd_status(struct fusion_context *fusion, scmd->result = (DID_OK << 16) | ext_status; if (ext_status == SAM_STAT_CHECK_CONDITION) { - memset(scmd->sense_buffer, 0, - SCSI_SENSE_BUFFERSIZE); memcpy(scmd->sense_buffer, sense, SCSI_SENSE_BUFFERSIZE); }