Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp465064lfb; Mon, 2 May 2022 10:18:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrdqQ0c937Dd9G7CkqMGkwLjK2y30V9Zs6iicRXv6Y1wpigT94xMj4zEqOdY3a9Lx6btRp X-Received: by 2002:a05:651c:505:b0:24f:5248:3018 with SMTP id o5-20020a05651c050500b0024f52483018mr5069763ljp.45.1651511909207; Mon, 02 May 2022 10:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651511909; cv=none; d=google.com; s=arc-20160816; b=VY1gapGvXJIdRwuWfBc6KcIS8hmrigV2/IdzcM5vaytpkCj29jE2qm2G15jmt+RtIH t08ZcPc2j/+9iLQlm0WL4FOnjr80V92PubP6lrs/p1kLSDBMpAV7p+iq4UUMJWExT2+3 b6QYu+hlVj03kjqzfFlq+jffbS9FJHsUxomwKMxh+BZu+Qy1qmeNk6lTqtKiiXyjgNpm 3NGUCo9tx/+4krQAV3saurnvBbAG1dwufCp6OY52kZGmYtxBzlWTdBJ/PwQeLvm1Weoi AKXc8IoqtGthZoedIlAZ4kOcK1Yk+4acl8udIuB53bMULg+5hUwExBoicSViaM90L4Kn V81Q== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=gfEY5zgbjfKqrY1qRzfaOcVmvoDOCTO5iWqrCSQxrGM=; b=uwBBAkJ7Ntsk5IZwBNOhrcxnH/SpGIcwigXW9jXn99nu+2u9QCIPwZCtYzXu7GRXwS 4Te3AbyLMTfZAzCna/+SjqausTm7nKyZNKP/Je8uBsHzdAigUQfo8IaXIQuGSJmQaZFA kTi18tpTm1ckI2zALvXRbqV1k5Z3Iea97ligw8jPGT76eMhgCiIg4wMR4+LaYAmcxAV/ OA3OZUfk9KUF3JLdCrAWY9uW2a6D08Jxbe8CVtVK+z+rLDb1+HA9vDvrLE6zX6dES5Hk B2hPva3fCOXhTCACt3bnXmUvyxOLm8tZxDTpYakZKqk6gaRiuEu/X2arhLxlkSOFUNcw tqhw== 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 g23-20020a0565123b9700b004729cddf0c1si4480410lfv.182.2022.05.02.10.17.37; Mon, 02 May 2022 10:18:29 -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 S241005AbiD3JKX (ORCPT + 99 others); Sat, 30 Apr 2022 05:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238358AbiD3JKW (ORCPT ); Sat, 30 Apr 2022 05:10:22 -0400 Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr [80.12.242.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 351E17C782 for ; Sat, 30 Apr 2022 02:07:00 -0700 (PDT) Received: from [192.168.1.18] ([86.243.180.246]) by smtp.orange.fr with ESMTPA id kj42nAiNWPp5ukj42nS5Lg; Sat, 30 Apr 2022 11:06:57 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 30 Apr 2022 11:06:57 +0200 X-ME-IP: 86.243.180.246 Message-ID: Date: Sat, 30 Apr 2022 11:06:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] scsi: elx: efct: remove unnecessary memset in efct_io Content-Language: en-US To: Finn Thain , Wan Jiabing Cc: 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, cocci@inria.fr References: <20220318145230.1031-1-wanjiabing@vivo.com> <794191df-e745-c591-bf1d-37945f96e73a@wanadoo.fr> From: Christophe JAILLET In-Reply-To: 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 30/04/2022 à 09:48, Finn Thain a écrit : > On Sat, 30 Apr 2022, Christophe JAILLET wrote: > >> 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. >> > > Seems like kcalloc() conversion could be a separate patch. Perhaps it > could be done everywhere using a coccinelle script. Sure it can and I guess that many coccinelle script already exist for it. I only replied here because of a comment from Joe Perches on the same patch a few month ago (see [1] and [2]) So Wan Jiabing or anyone else, if you want to go one step further, just feel free to propose it. CJ [1]: https://lore.kernel.org/all/4208b3d08a677601c73889f78dd25e5c9f056a86.camel@perches.com/ [2]: https://lore.kernel.org/all/9be7d5beb437583f8d975d168ac5c3e32fb6e465.1639158677.git.christophe.jaillet@wanadoo.fr/