@@ -55,9 +55,6 @@
#define LIB_DESTRUCTOR __attribute__((destructor))
#define CDECL_FUNC
-#define container_of(ptr, type, field) \
- ((type *) ((void *) ptr - offsetof(type, field)))
-
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htonll(x) bswap_64(x)
#else
@@ -201,25 +201,6 @@ static inline void list_splice_init(struct list_head *list,
}
}
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
-/**
- * container_of - cast a member of a structure out to the containing structure
- *
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#ifndef container_of
-#define container_of(ptr, type, member) ({ \
- const typeof(((type *)0)->member)*__mptr = (ptr); \
- (type *)((char *)__mptr - offsetof(type, member)); })
-#endif
-
-
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
@@ -70,12 +70,6 @@ static inline uint64_t htonll(uint64_t x) { return x; }
static inline uint64_t ntohll(uint64_t x) { return x; }
#endif
-#ifndef container_of
-#define container_of(ptr, type, field) \
- ((type *) ((void *)ptr - offsetof(type, field)))
-#endif
-
-
/*
* Fast synchronization for low contention locking.
*/
Signed-off-by: Leon Romanovsky <leon@kernel.org> --- ibacm/linux/osd.h | 3 --- libmlx5/src/list.h | 19 ------------------- librdmacm/src/cma.h | 6 ------ 3 files changed, 28 deletions(-)