summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-04-17 10:58:55 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-19 12:01:44 -0400
commit0061459744cb985ef31a484bcd9b2fc3cfd01c1b (patch)
tree02095bc72832a56ee611e6ff019e472c0ddc637a
parent877a7a11050ee4d465364c57f8fbf78f6b1a2559 (diff)
objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now
And 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-roiwxwgwgld4kygn65if60wa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/objtool/builtin-check.c3
-rw-r--r--tools/objtool/objtool.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index 066086dd59a8..282a60368b14 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -36,8 +36,7 @@
36#include "warn.h" 36#include "warn.h"
37 37
38#include <linux/hashtable.h> 38#include <linux/hashtable.h>
39 39#include <linux/kernel.h>
40#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
41 40
42#define STATE_FP_SAVED 0x1 41#define STATE_FP_SAVED 0x1
43#define STATE_FP_SETUP 0x2 42#define STATE_FP_SETUP 0x2
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index 46c326db4f46..ecc5b1b5d15d 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -31,11 +31,10 @@
31#include <stdlib.h> 31#include <stdlib.h>
32#include <subcmd/exec-cmd.h> 32#include <subcmd/exec-cmd.h>
33#include <subcmd/pager.h> 33#include <subcmd/pager.h>
34#include <linux/kernel.h>
34 35
35#include "builtin.h" 36#include "builtin.h"
36 37
37#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
38
39struct cmd_struct { 38struct cmd_struct {
40 const char *name; 39 const char *name;
41 int (*fn)(int, const char **); 40 int (*fn)(int, const char **);