Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2309104iob; Sat, 30 Apr 2022 05:20:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlCNpemNaryAeUtLBKwrMPUHi2HEenqisZqUAyJgGL98ngsUSG4DQOgpejXSlMM7mCg6HG X-Received: by 2002:a19:6409:0:b0:471:fa7f:3405 with SMTP id y9-20020a196409000000b00471fa7f3405mr2866513lfb.5.1651321223972; Sat, 30 Apr 2022 05:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651321223; cv=none; d=google.com; s=arc-20160816; b=l5R1tKMnu3JKqySdsmqzch9cof6l8K8jg2eoYr1MH/0N3UDrq28cH8FNU7UJleVWnI yr3cReAocyKrm34ELSepqdf9Zu37Rz8yRdlslvjpiU3uuoq5heahfKBE9ZhjxYGWVhA9 +9qe1Uxi3rApUu5xHvxjEEmqTeBdC1Mx/9bXyKEVzdEtGyZhN27b+65jphOL3OsrGP5l uLAL2szPUgnS5JuyJAHMCI3xMD2goEW36EruO8ydBuh5wQwMObr8PlU1BJOOVCw08InR gpZMslyFtK7871woaQH4EJYmrDtfZj4DAEBbDlqcxAr9qmOthCM1KgeZaecvBBjtY4ue qEcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:newsgroups:to:content-language:subject:user-agent :mime-version:date:message-id; bh=q7YMyPcjJgdYW2Rbt8vYK9ybxLGeBHkPL8a6AOVlGGk=; b=grq44H8qvvxJ1Hd67fR2PMg7wuX/tifvaqorveZVOY0GPbpiENJl/9rwuEiYFwdNRM MpYJrRSSD9Qsa3gh/lyE/hDsrdFcbzbR1StfjxGH9FeqCt7sU9d7LYY6tyfwlDuZ3evu DCE924xD2IGPEkC5luO1jKfKQW6lfZltoBvvhTXbGMDxlekpxMWRgSzMezhKI01f57OH reQunG4jOqo3QWJvI+T4LiuQpiUTseLR38zDmmO/0kihi7Z4CDUIO6oaWJbRS1VduA3A E7VcIB69hxLRh6RQLZAX6c/hl4YFjgkPZ9LjhJgEMJhQTo8yladWal90HfnVZSq2aRSO IVQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a05651233a200b0047199776bb3si9549204lfg.405.2022.04.30.05.19.56; Sat, 30 Apr 2022 05:20:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350247AbiD3GdZ (ORCPT + 99 others); Sat, 30 Apr 2022 02:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348588AbiD3GdW (ORCPT ); Sat, 30 Apr 2022 02:33:22 -0400 Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21296393E4 for ; Fri, 29 Apr 2022 23:29:57 -0700 (PDT) Received: from [192.168.1.18] ([86.243.180.246]) by smtp.orange.fr with ESMTPA id kgc0nZiwSuIQVkgc0nTrzn; Sat, 30 Apr 2022 08:29:55 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 30 Apr 2022 08:29:55 +0200 X-ME-IP: 86.243.180.246 Message-ID: <794191df-e745-c591-bf1d-37945f96e73a@wanadoo.fr> Date: Sat, 30 Apr 2022 08:29:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] scsi: elx: efct: remove unnecessary memset in efct_io Content-Language: en-US To: Wan Jiabing , James Smart , Ram Vegesna , "James E.J. Bottomley" , "Martin K. Petersen" , Daniel Wagner , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Newsgroups: gmane.linux.scsi,gmane.linux.scsi.target.devel,gmane.linux.kernel References: <20220318145230.1031-1-wanjiabing@vivo.com> From: Christophe JAILLET In-Reply-To: <20220318145230.1031-1-wanjiabing@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 18/03/2022 à 15:52, Wan Jiabing a écrit : > io->sgl is allocated by kzalloc(). The memory is set to zero. > It is unnecessary to call memset again. > Hi, Nitpick: this kzalloc() should be a kcalloc() to avoid an open-coded multiplication when computing the size to allocate. CJ > Signed-off-by: Wan Jiabing > --- > 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; >