From: "Chan Kim" <ckim@etri.re.kr>
To: <kernelnewbies@kernelnewbies.org>
Subject: About the name of 'struct list_head', how about giving an alias for differentiating the usage?
Date: Mon, 3 Jul 2023 14:47:32 +0900 [thread overview]
Message-ID: <03b601d9ad71$dccecb70$966c6250$@etri.re.kr> (raw)
Hello all,
Often when I analyze linux source code, it takes me some time to figure out
how a list_head member of a struct is being used.
Sometimes it points to a linked list's start member, but sometimes it used
to link the containing struct as a member of linked list.(you know we cat
get the struct in the linked list using container_of operator). Wouldn't it
be nice if we give list_head an alias like 'list_hook_head' (or just
list_hook) so that the alias can be used for the second case? By gradually
changing the type name to list_hook_head in some structs, we could make the
source code more easier to read. I hope someone do this someday..
Thank you.
Chan Kim
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
reply other threads:[~2023-07-03 5:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='03b601d9ad71$dccecb70$966c6250$@etri.re.kr' \
--to=ckim@etri.re.kr \
--cc=kernelnewbies@kernelnewbies.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).