All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Li Hongyu <lihongyu1999@bupt.edu.cn>
Cc: "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>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Re: [PATCH] maple: change the pointer name from maple_enode to maple_enode_p
Date: Sun, 17 Jul 2022 15:47:55 +0100	[thread overview]
Message-ID: <YtQhGyEw5Tn2eNPh@casper.infradead.org> (raw)
In-Reply-To: <20220717120652.GA9281@38c3a67cb865>

On Sun, Jul 17, 2022 at 09:12:42PM +0900, Li Hongyu wrote:
> 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 */

If this is the only change needed, then clearly they're not being used,
so just delete them?


  reply	other threads:[~2022-07-17 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-17 12:12 [PATCH] maple: change the pointer name from maple_enode to maple_enode_p Li Hongyu
2022-07-17 14:47 ` Matthew Wilcox [this message]
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=YtQhGyEw5Tn2eNPh@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=lihongyu1999@bupt.edu.cn \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.