From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Yu-Chun Lin <eleanor15x@gmail.com>, "hch@lst.de" <hch@lst.de>,
"sagi@grimberg.me" <sagi@grimberg.me>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"visitorckw@gmail.com" <visitorckw@gmail.com>,
"jserv@ccns.ncku.edu.tw" <jserv@ccns.ncku.edu.tw>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] nvmet: replace kmalloc + memset with kzalloc for data allocation
Date: Tue, 3 Dec 2024 02:00:54 +0000 [thread overview]
Message-ID: <7ea0727c-468d-4e5d-8536-30a31b15f3d7@nvidia.com> (raw)
In-Reply-To: <20241130170258.103954-1-eleanor15x@gmail.com>
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@intel.com>
> Closes:https://lore.kernel.org/oe-kbuild-all/202411301434.LEckbcWx-lkp@intel.com/
> Reviewed-by: Kuan-Wei Chiu<visitorckw@gmail.com>
> Signed-off-by: Yu-Chun Lin<eleanor15x@gmail.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
next prev parent reply other threads:[~2024-12-03 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 17:02 [PATCH] nvmet: replace kmalloc + memset with kzalloc for data allocation Yu-Chun Lin
2024-12-03 0:36 ` Christoph Hellwig
2024-12-03 2:00 ` Chaitanya Kulkarni [this message]
2024-12-03 19:03 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ea0727c-468d-4e5d-8536-30a31b15f3d7@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=eleanor15x@gmail.com \
--cc=hch@lst.de \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=lkp@intel.com \
--cc=sagi@grimberg.me \
--cc=visitorckw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox