Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626461 > unrolled thread

[PATCH 08/28] tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2017-04-19 18:30 +0200
Last post2017-04-19 18:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 08/28] tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200

#1626461 — [PATCH 08/28] tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-04-19 18:30 +0200
Subject[PATCH 08/28] tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h
Message-ID<ty0Eq-5Fr-29@gated-at.bofh.it>
From: Arnaldo Carvalho de Melo <acme@redhat.com>

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.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-v0b41ivu6z6dyugbq9ffa9ez@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/linux/hashtable.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tools/include/linux/hashtable.h b/tools/include/linux/hashtable.h
index c65cc0aa2659..251eabf2a05e 100644
--- a/tools/include/linux/hashtable.h
+++ b/tools/include/linux/hashtable.h
@@ -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 }
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web