Re: [PATCH] maple: change the pointer name from maple_enode to maple_enode_p

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> ---
>  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?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux