lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL2rwxofgia7mQ=5pvZ_ey1XT2cQP20f3XwOhhQ+e0fdLEQ1jw@mail.gmail.com>
Date:   Thu, 7 Apr 2022 13:04:52 +0530
From:   Sumit Saxena <sumit.saxena@...adcom.com>
To:     Wan Jiabing <wanjiabing@...o.com>
Cc:     Kashyap Desai <kashyap.desai@...adcom.com>,
        Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        "PDL,MEGARAIDLINUX" <megaraidlinux.pdl@...adcom.com>,
        Linux SCSI List <linux-scsi@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: megaraid_sas: remove unnecessary memset

On Thu, Apr 7, 2022 at 12:55 PM Wan Jiabing <wanjiabing@...o.com> 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 <wanjiabing@...o.com>
Thank you.
Acked-by: Sumit Saxena <sumit.saxena@...adcom.com>
> ---
>  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
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ