Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp608501lfu; Thu, 7 Apr 2022 11:58:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4O9p+JOaVU0nRR+wsnNdBGX5TKZi7pjT9XqXIw+FZIizkIlGGdlrH04nPyfWhCQzCrlVW X-Received: by 2002:aa7:c40a:0:b0:41d:c4f:ceeb with SMTP id j10-20020aa7c40a000000b0041d0c4fceebmr3529618edq.185.1649357908630; Thu, 07 Apr 2022 11:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649357908; cv=none; d=google.com; s=arc-20160816; b=0R3lK7IPHT6ihl85PIhCwcl4wPSZEp3FVQdy85yIV8UrJ9P/Kj21rBOFI0u/lfrLBU WdZEiR0sMQ4MT3umF9s6VzNOFnYGC8KfyUJgwY2oIBpnG5BT7V6I0wB3QiXrmFM6k0Hm sOxBXIS8byBRQQWh3IQp0/EaAQSzc7U/EegeRRBbSUCZ7FxzC+BH+/MxNIHL7bq94/S3 azvs+fyK9rBwebOlZcDNP6xAdySObE40AZrTY0NGeJbdjlP9S/wOW9e+VV9BfcIqUmJK DjDdyaCXTtYQsDaqXXrGbQ/mQ/qG8HRGCA4QJOWSw0Gms1NMs/zy2Az1UDQMymXSUL13 w7dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bB2jDxWWF5k+76BCE7Lx2lYDiH+i/nPcSWTbtZpSzJU=; b=PN/2jK+3BkCEFIXDUrVOlEg1Lc6OXcvNP2TnY6ngKY5D+8lxk7+OlGnL6V6sRExj4q 4O1mgQhK3fmTfvoG9M/xy/i4O2RTKBj01xIk+/BidMMH9499dAeZiJ05pMYZz3SX6EAJ Ef7gXF6xGCSzoSxCfJEK+lSdHqR5OcHvlaug0CTaqdstT8x6EhtdCcwtk17siLuJtZ0l aUG3h9L+Cb5j2Qg9rbeVqnQr+ObFs2UIaLgRAIjtwjmvHpcCa5A+gmNKtr/6PWDtlEOx gkyMXXbrDJ0Sb03lWyZwpqt7ALEZWHcdBnpzzFhXp6qeqrbZYNC9qLJ/qqamg7xMFnb8 0ufQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=XWsgKK7P; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a50e406000000b00418c2b5bf55si15602185edm.567.2022.04.07.11.58.00; Thu, 07 Apr 2022 11:58:27 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=XWsgKK7P; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241931AbiDGHiM (ORCPT + 99 others); Thu, 7 Apr 2022 03:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241911AbiDGHhT (ORCPT ); Thu, 7 Apr 2022 03:37:19 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4731F1ACA5F for ; Thu, 7 Apr 2022 00:35:19 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id m12-20020a17090b068c00b001cabe30a98dso8117832pjz.4 for ; Thu, 07 Apr 2022 00:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bB2jDxWWF5k+76BCE7Lx2lYDiH+i/nPcSWTbtZpSzJU=; b=XWsgKK7PAv+jAe4FEzdRg44vaFdeThUl9H9LeXK39XoMHy07pTtnVybA3KsW2Jj7hW o3FE9ELLVPp/nbw8oAWVhf9FGeHXd874ztBC3ON0hp75FOzc+25/VXT2BOP5T/j8YVm7 9ohVac6DWFLHC3/J79wp/k57iDsKNSUISioYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bB2jDxWWF5k+76BCE7Lx2lYDiH+i/nPcSWTbtZpSzJU=; b=DV5RHiIzhLxkPKHVdw3pyPit70pXOO4l/hFmopKXXIsmTXUwXLywK6vZw5PTDKI7Bv RFIuSQDMr5omrxzJZQdnoYRfeqWY52MoXDo/YxaxazeCJZtVYfFu32FSGYPYodeIVquz ljIU5+lWk6ZBLx6uZ1pPBTOuJVVw+2plB2dLWWe6UCxWxi0WBaSW4o1y5v2C79kfSM9I AdHV2oPO3K5EypWBMOfojNhrqD9WzzQdqGKME70yKvehlaALRp/M0LWrGh/mjheSIJCI 6NsDRNiQ/jXtpwvxfUAsjF5n/hslZYkhxQHhpeOnq28Nfszh/4VdSdYh31K0xwR/i0Ei PYkQ== X-Gm-Message-State: AOAM532rElpTF9KFLf7JtCCl2oFLYanIXKL/PUh+I/KabYYrwNxz8/jy eWwHMYFyX8/88qgtDzNlS+7RmI+u0sfmaKKjefJ6u8he/g5gjBjxCdY= X-Received: by 2002:a17:903:285:b0:157:e07:888c with SMTP id j5-20020a170903028500b001570e07888cmr695545plr.21.1649316918599; Thu, 07 Apr 2022 00:35:18 -0700 (PDT) MIME-Version: 1.0 References: <20220407072442.4137977-1-wanjiabing@vivo.com> In-Reply-To: <20220407072442.4137977-1-wanjiabing@vivo.com> From: Sumit Saxena Date: Thu, 7 Apr 2022 13:04:52 +0530 Message-ID: Subject: Re: [PATCH] scsi: megaraid_sas: remove unnecessary memset To: Wan Jiabing Cc: Kashyap Desai , Shivasharan S , "James E.J. Bottomley" , "Martin K. Petersen" , "PDL,MEGARAIDLINUX" , Linux SCSI List , LKML Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000001301d605dc0b854e" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 --0000000000001301d605dc0b854e Content-Type: text/plain; charset="UTF-8" On Thu, Apr 7, 2022 at 12:55 PM Wan Jiabing wrote: > > instance->cmd_list is allocated by kcalloc(). The memory is set to zero. > It is unnecessary to call memset again. > > Signed-off-by: Wan Jiabing Thank you. Acked-by: Sumit Saxena > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c > index 8bf72dbc33b7..33f3226023f3 100644 > --- a/drivers/scsi/megaraid/megaraid_sas_base.c > +++ b/drivers/scsi/megaraid/megaraid_sas_base.c > @@ -4466,8 +4466,6 @@ int megasas_alloc_cmds(struct megasas_instance *instance) > return -ENOMEM; > } > > - memset(instance->cmd_list, 0, sizeof(struct megasas_cmd *) *max_cmd); > - > for (i = 0; i < max_cmd; i++) { > instance->cmd_list[i] = kmalloc(sizeof(struct megasas_cmd), > GFP_KERNEL); > -- > 2.35.1 > --0000000000001301d605dc0b854e Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQbQYJKoZIhvcNAQcCoIIQXjCCEFoCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3EMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8WU2cK4qsEtj09JS4+mhi0CTCrCnXAzum3tgcH cHRg0prcSzzEUDQWoFxyuqwiwhHu3sPQNmFOMwIDAQABo4IB2jCCAdYwDgYDVR0PAQH/BAQDAgGG MGAGA1UdJQRZMFcGCCsGAQUFBwMCBggrBgEFBQcDBA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