[PATCH v2 06/17] ptrlist: remove some unneeded arg from internal macros.

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

 



Some macros used internally for the list walking have unneeded arguments.

Remove these unnneded arguments as this help to make the lines shorter
and more readable.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 ptrlist.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ptrlist.h b/ptrlist.h
index c11b70d11..8d2f99ce9 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -244,7 +244,7 @@ static inline void *last_ptr_list(struct ptr_list *list)
 
 extern void split_ptr_list_head(struct ptr_list *);
 
-#define DO_SPLIT(ptr, __head, __list, __nr) do {					\
+#define DO_SPLIT(__head, __list, __nr) do {						\
 	split_ptr_list_head((struct ptr_list*)__list);					\
 	if (__nr >= __list->nr) {							\
 		__nr -= __list->nr;							\
@@ -252,10 +252,10 @@ extern void split_ptr_list_head(struct ptr_list *);
 	};										\
 } while (0)
 
-#define DO_INSERT_CURRENT(new, ptr, __head, __list, __nr) do {				\
+#define DO_INSERT_CURRENT(new, __head, __list, __nr) do {				\
 	TYPEOF(__head) __this, __last;							\
 	if (__list->nr == LIST_NODE_NR)							\
-		DO_SPLIT(ptr, __head, __list, __nr);					\
+		DO_SPLIT(__head, __list, __nr);						\
 	__this = __list->list + __nr;							\
 	__last = __list->list + __list->nr - 1;						\
 	while (__last >= __this) {							\
@@ -267,9 +267,9 @@ extern void split_ptr_list_head(struct ptr_list *);
 } while (0)
 
 #define INSERT_CURRENT(new, ptr) \
-	DO_INSERT_CURRENT(new, ptr, __head##ptr, __list##ptr, __nr##ptr)
+	DO_INSERT_CURRENT(new, __head##ptr, __list##ptr, __nr##ptr)
 
-#define DO_DELETE_CURRENT(ptr, __head, __list, __nr) do {				\
+#define DO_DELETE_CURRENT(__head, __list, __nr) do {					\
 	TYPEOF(__head) __this = __list->list + __nr;					\
 	TYPEOF(__head) __last = __list->list + __list->nr - 1;				\
 	while (__this < __last) {							\
@@ -281,7 +281,7 @@ extern void split_ptr_list_head(struct ptr_list *);
 } while (0)
 
 #define DELETE_CURRENT_PTR(ptr) \
-	DO_DELETE_CURRENT(ptr, __head##ptr, __list##ptr, __nr##ptr)
+	DO_DELETE_CURRENT(__head##ptr, __list##ptr, __nr##ptr)
 
 #define REPLACE_CURRENT_PTR(ptr, new_ptr)						\
 	do { *THIS_ADDRESS(ptr) = (new_ptr); } while (0)
-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux