Skip to contentSkip to conversation

remove unused "container" macro

PATCH Applied Jan Pokorný 2 participants 2 messages Apr 7, 2011 – Apr 13, 2011 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove unused "container" macro

This macro seems to be unused since commit e7fb6e0 (4 years ago). But my estimation that it does not currently have any practical usage for navigating through the sparse structures may be wrong.

---
 ptrlist.h |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
ptrlist.h +0 -2
index fbfc080..58d3bda 100644
@@ -9,9 +9,6 @@
  * (C) Copyright Linus Torvalds 2003-2005
  */
 
-#define container(ptr, type, member) \
-	(type *)((void *)(ptr) - offsetof(type, member))
maintainer Applied
#1 lore raw

Applied.

Chris

Quoted 24 lines · Jan Pokorný

This macro seems to be unused since commit e7fb6e0 (4 years ago). But my estimation that it does not currently have any practical usage for navigating through the sparse structures may be wrong.

---
 ptrlist.h |    3 ---

 1 files changed, 0 insertions(+), 3 deletions(-)
ptrlist.h +0 -4
index fbfc080..58d3bda 100644
@@ -9,9 +9,6 @@
  * (C) Copyright Linus Torvalds 2003-2005
  */
 
-#define container(ptr, type, member) \
-       (type *)((void *)(ptr) - offsetof(type, member))
-
  /* Silly type-safety check ;) */
  #define DECLARE_PTR_LIST(listname,type)        struct listname { type *list[1]; }
  #define CHECK_TYPE(head,ptr)           (void)(&(ptr) == &(head)->list[0])
--
Quoted 2 lines

1.7.1

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