From patchwork Fri Apr 15 10:19:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: baihaowen X-Patchwork-Id: 12814760 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 70ADBC433FE for ; Fri, 15 Apr 2022 10:19:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352202AbiDOKVt (ORCPT ); Fri, 15 Apr 2022 06:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348368AbiDOKVs (ORCPT ); Fri, 15 Apr 2022 06:21:48 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EEA3BB090; Fri, 15 Apr 2022 03:19:17 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 15 Apr 2022 18:19:16 +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; Fri, 15 Apr 2022 18:19:15 +0800 From: Haowen Bai To: James Smart , Ram Vegesna , "James E.J. Bottomley" , "Martin K. Petersen" CC: Haowen Bai , , , Subject: [PATCH] scsi: efct: Remove unnecessary memset when using kzalloc() Date: Fri, 15 Apr 2022 18:19:12 +0800 Message-ID: <1650017953-16995-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 io->sgl is allocated by kzalloc(). The memory is already set to zero. It is unnecessary to call memset again. Signed-off-by: Haowen Bai --- drivers/scsi/elx/efct/efct_io.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/elx/efct/efct_io.c b/drivers/scsi/elx/efct/efct_io.c index c3247b951a76..c612f0a48839 100644 --- a/drivers/scsi/elx/efct/efct_io.c +++ b/drivers/scsi/elx/efct/efct_io.c @@ -62,7 +62,6 @@ efct_io_pool_create(struct efct *efct, u32 num_sgl) return NULL; } - memset(io->sgl, 0, sizeof(*io->sgl) * num_sgl); io->sgl_allocated = num_sgl; io->sgl_count = 0;