From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: question about lists
Date: Mon, 04 May 2020 19:23:39 +0000 [thread overview]
Message-ID: <20200504192339.GW2014@kadam> (raw)
In-Reply-To: <alpine.DEB.2.21.2005032308500.2533@hadrien>
On Sun, May 03, 2020 at 11:10:01PM +0200, Julia Lawall wrote:
> Hello,
>
> I was wondering what is the point of code like the following:
>
> INIT_LIST_HEAD(&bb->list);
> list_add(&bb->list, &s->workload->shadow_bb);
>
> As far as I can see, list_add will initialize both fields of the list_head
> structure without looking at their values, so why is the INIT_LIST_HEAD
> needed?
Yeah. You're right. It's not needed.
regards,
dan carpenter
next prev parent reply other threads:[~2020-05-04 19:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 21:10 question about lists Julia Lawall
2020-05-04 19:23 ` Dan Carpenter [this message]
2020-05-04 19:28 ` Julia Lawall
2020-05-04 19:41 ` Christophe JAILLET
2020-05-05 8:35 ` Dan Carpenter
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=20200504192339.GW2014@kadam \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).