summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg2015-05-15 20:40:19 +0200
committerGreg Kroah-Hartman2015-05-31 02:19:37 +0200
commit36fc24486910d492881f279cb97ad33b69859ebd (patch)
tree114b3efd76af3ead9aa56f2571d9c66377867395
parentstaging/lustre: Remove __attribute__ definition from libcfs.h (diff)
downloadkernel-qcow2-linux-36fc24486910d492881f279cb97ad33b69859ebd.tar.gz
kernel-qcow2-linux-36fc24486910d492881f279cb97ad33b69859ebd.tar.xz
kernel-qcow2-linux-36fc24486910d492881f279cb97ad33b69859ebd.zip
staging/lustre: Remove duplicate helpers from libcfs.h
Remove bunch of duplicate helpers from libcfs.h that are guaranteed to be present. Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 244f1aaecad2..a789559b81c2 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -42,25 +42,6 @@
#include "curproc.h"
-#ifndef offsetof
-# define offsetof(typ, memb) ((long)(long_ptr_t)((char *)&(((typ *)0)->memb)))
-#endif
-
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0])))
-#endif
-
-#if !defined(swap)
-#define swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
-#endif
-
-#if !defined(container_of)
-/* given a pointer @ptr to the field @member embedded into type (usually
- * struct) @type, return pointer to the embedding instance of @type. */
-#define container_of(ptr, type, member) \
- ((type *)((char *)(ptr)-(char *)(&((type *)0)->member)))
-#endif
-
static inline int __is_po2(unsigned long long val)
{
return !(val & (val - 1));