[PATCH 03/13] ptrlist: remove now unneeded CHECK_TYPE()

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

 



Now that the list walking macros use the real type, extra type
checking is not needed anymore as the normal typechecking done by
the compiler will be enough.

So, remove these unnneded call to CHECK_TYPE().

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

diff --git a/ptrlist.h b/ptrlist.h
index 4e985d45b..e01edd1c3 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -112,7 +112,6 @@ static inline void *last_ptr_list(struct ptr_list *list)
 		__typeof__(head) __head = head;						\
 		__typeof__(head) __list = head;						\
 		int __nr = 0;								\
-		CHECK_TYPE(head,ptr);							\
 		ptr = PTR_DEREF(__head, 0, PTR_ENTRY);					\
 
 #define DO_NEXT(ptr, __head, __list, __nr, PTR_ENTRY)					\
@@ -157,7 +156,6 @@ static inline void *last_ptr_list(struct ptr_list *list)
 #define DO_FOR_EACH(head, ptr, __head, __list, __nr, PTR_ENTRY) do {			\
 	__typeof__(head) __head = head;							\
 	__typeof__(head) __list = head;							\
-	CHECK_TYPE(head,ptr);								\
 	if (__head) {									\
 		do { int __nr;								\
 			for (__nr = 0; __nr < __list->nr; __nr++) {			\
@@ -178,7 +176,6 @@ static inline void *last_ptr_list(struct ptr_list *list)
 #define DO_FOR_EACH_REVERSE(head, ptr, __head, __list, __nr, PTR_ENTRY) do {		\
 	__typeof__(head) __head = head;							\
 	__typeof__(head) __list = head;							\
-	CHECK_TYPE(head,ptr);								\
 	if (__head) {									\
 		do { int __nr;								\
 			__list = __list->prev;						\
-- 
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