From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: I-HSIN CHENG <richard120310@gmail.com>
Cc: philipp.reisner@linbit.com, linux-kernel@vger.kernel.org,
drbd-dev@lists.linbit.com
Subject: Re: [PATCH] lru_cache: Initialize hlist_head in lc_create
Date: Tue, 16 Apr 2024 15:42:17 +0200 [thread overview]
Message-ID: <Zh6AOaymY1kF+V8F@grappa.linbit> (raw)
In-Reply-To: <20240311030735.233470-1-richard120310@gmail.com>
On Mon, Mar 11, 2024 at 11:07:35AM +0800, I-HSIN CHENG wrote:
> Use INIT_HLIST_HEAD to perform the initialization for each pointer to
> struct list_head in the variable "slot" to provide more safety and
> prevent possible bugs from uninitialized behavior.
Completely pointless. It is kcalloc'd. Why explicitly zero-out something
that was already explicitly zeroed out to begin with.
Lars
next prev parent reply other threads:[~2024-04-16 13:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 3:07 [PATCH] lru_cache: Initialize hlist_head in lc_create I-HSIN CHENG
2024-04-16 13:42 ` Lars Ellenberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-03-11 3:44 I-HSIN CHENG
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=Zh6AOaymY1kF+V8F@grappa.linbit \
--to=lars.ellenberg@linbit.com \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=philipp.reisner@linbit.com \
--cc=richard120310@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