[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ea0727c-468d-4e5d-8536-30a31b15f3d7@nvidia.com>
Date: Tue, 3 Dec 2024 02:00:54 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Yu-Chun Lin <eleanor15x@...il.com>, "hch@....de" <hch@....de>,
"sagi@...mberg.me" <sagi@...mberg.me>, Chaitanya Kulkarni
<chaitanyak@...dia.com>
CC: "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"visitorckw@...il.com" <visitorckw@...il.com>, "jserv@...s.ncku.edu.tw"
<jserv@...s.ncku.edu.tw>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] nvmet: replace kmalloc + memset with kzalloc for data
allocation
On 11/30/24 09:02, Yu-Chun Lin wrote:
> cocci warnings: (new ones prefixed by >>)
>>> drivers/nvme/target/pr.c:831:8-15: WARNING: kzalloc should be used for data, instead of kmalloc/memset
> The pattern of using 'kmalloc' followed by 'memset' is replaced with
> 'kzalloc', which is functionally equivalent to 'kmalloc' + 'memset',
> but more efficient. 'kzalloc' automatically zeroes the allocated
> memory, making it a faster and more streamlined solution.
>
> Reported-by: kernel test robot<lkp@...el.com>
> Closes:https://lore.kernel.org/oe-kbuild-all/202411301434.LEckbcWx-lkp@intel.com/
> Reviewed-by: Kuan-Wei Chiu<visitorckw@...il.com>
> Signed-off-by: Yu-Chun Lin<eleanor15x@...il.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>
-ck
Powered by blists - more mailing lists