Skip to contentSkip to conversation

tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 20, 2017

lore
Share & tools
lore
#0 lore raw
Commit-ID:  68289cbd83eaa20faef7cc818121bc8e769065de
Gitweb:     http://git.kernel.org/tip/68289cbd83eaa20faef7cc818121bc8e769065de
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 17 Apr 2017 12:01:36 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 19 Apr 2017 13:01:45 -0300

tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h

As tools/include/linux/kernel.h has it now, with the goodies present in the kernel.h counterpart, i.e. checking that the parameter is an array at build time.

---
 tools/include/linux/hashtable.h | 4 ----
 1 file changed, 4 deletions(-)
tools/include/linux/hashtable.h +0 -4
index c65cc0a..251eabf 100644
@@ -13,10 +13,6 @@
 #include <linux/hash.h>
 #include <linux/log2.h>
 
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
-
 #define DEFINE_HASHTABLE(name, bits)						\
 	struct hlist_head name[1 << (bits)] =					\
 			{ [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT }