From: Li Hongyu <lihongyu1999@bupt.edu.cn>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: [PATCH] maple: change the pointer name from maple_enode to maple_enode_p
Date: Sun, 17 Jul 2022 21:12:42 +0900 [thread overview]
Message-ID: <20220717120652.GA9281@38c3a67cb865> (raw)
The current name of the pointer to struct maple_enode is also
maple_enode. This is correct from the grammar point but can be
comfusing. Besides it seems in Linux it prefers typedef struct foo
*foo_p;, e.g. typedef struct cpumask *cpumask_var_t; and typedef
struct cgraph_node *cgraph_node_ptr;. I use re to search in the
Linux project and cannot find another example in typedef struct
foo *foo; style.
This also results in a bug in the bindings of the
rust-for-linux subsystem, which can be seen in this github issue.
https://github.com/Rust-for-Linux/linux/issues/795
The struct pointer maple_enode and maple_pnode are not used. It is
safe to change it to a new name.
Signed-off-by: Li Hongyu <lihongyu1999@bupt.edu.cn>
---
include/linux/maple_tree.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index 2c9dede989c7..4886e019a2b5 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -72,8 +72,8 @@
* 0x010 : 32 bit values, type in 0-2, slot in 3-6
* 0x110 : 64 bit values, type in 0-2, slot in 3-6
*/
-typedef struct maple_enode *maple_enode; /* encoded node */
-typedef struct maple_pnode *maple_pnode; /* parent node */
+typedef struct maple_enode *maple_enode_p; /* encoded node */
+typedef struct maple_pnode *maple_pnode_p; /* parent node */
/*
* This metadata is used to optimize the gap updating code and in reverse
--
2.17.1
next reply other threads:[~2022-07-17 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 12:12 Li Hongyu [this message]
2022-07-17 14:47 ` [PATCH] maple: change the pointer name from maple_enode to maple_enode_p Matthew Wilcox
2022-07-18 4:27 ` Li Hongyu
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=20220717120652.GA9281@38c3a67cb865 \
--to=lihongyu1999@bupt.edu.cn \
--cc=Liam.Howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miguel.ojeda.sandonis@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;
as well as URLs for NNTP newsgroup(s).