From patchwork Thu Apr 21 09:24:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: baihaowen X-Patchwork-Id: 565593 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 7D57AC433EF for ; Thu, 21 Apr 2022 09:25:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356019AbiDUJ2Y (ORCPT ); Thu, 21 Apr 2022 05:28:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387656AbiDUJ1s (ORCPT ); Thu, 21 Apr 2022 05:27:48 -0400 Received: from mail.meizu.com (unknown [14.29.68.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 296F0DB5; Thu, 21 Apr 2022 02:24:54 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail04.meizu.com (172.16.1.16) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 21 Apr 2022 17:24:56 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 21 Apr 2022 17:24:52 +0800 From: Haowen Bai To: Nilesh Javali , Manish Rangankar , , "James E.J. Bottomley" , "Martin K. Petersen" CC: Haowen Bai , , Subject: [PATCH] scsi: qla4xxx: Drop redundant memset Date: Thu, 21 Apr 2022 17:24:50 +0800 Message-ID: <1650533091-28815-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. So we drop redundant memset. Signed-off-by: Haowen Bai --- drivers/scsi/qla4xxx/ql4_os.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 3f6cb2a5c2c2..9e849f6b0d0f 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -671,7 +671,6 @@ static void qla4xxx_create_chap_list(struct scsi_qla_host *ha) goto exit_chap_list; } - memset(ha->chap_list, 0, chap_size); memcpy(ha->chap_list, chap_flash_data, chap_size); exit_chap_list: