kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question about lists
@ 2020-05-03 21:10 Julia Lawall
  2020-05-04 19:23 ` Dan Carpenter
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Julia Lawall @ 2020-05-03 21:10 UTC (permalink / raw)
  To: kernel-janitors

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?

thanks,
julia

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-05  8:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-03 21:10 question about lists Julia Lawall
2020-05-04 19:23 ` Dan Carpenter
2020-05-04 19:28 ` Julia Lawall
2020-05-04 19:41 ` Christophe JAILLET
2020-05-05  8:35 ` Dan Carpenter

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).