Skip to content

Commit 2e6eb1c

Browse files
Richardhongyuintel-lab-lkp
authored andcommitted
maple: change the pointer name from maple_enode to maple_enode_p
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. Rust-for-Linux#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 <[email protected]>
1 parent 37b355f commit 2e6eb1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/maple_tree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
* 0x010 : 32 bit values, type in 0-2, slot in 3-6
7373
* 0x110 : 64 bit values, type in 0-2, slot in 3-6
7474
*/
75-
typedef struct maple_enode *maple_enode; /* encoded node */
76-
typedef struct maple_pnode *maple_pnode; /* parent node */
75+
typedef struct maple_enode *maple_enode_p; /* encoded node */
76+
typedef struct maple_pnode *maple_pnode_p; /* parent node */
7777

7878
/*
7979
* This metadata is used to optimize the gap updating code and in reverse

0 commit comments

Comments
 (0)