objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 0061459744cb985ef31a484bcd9b2fc3cfd01c1b Gitweb: http://git.kernel.org/tip/0061459744cb985ef31a484bcd9b2fc3cfd01c1b Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Mon, 17 Apr 2017 11:58:55 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 19 Apr 2017 13:01:44 -0300
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 <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/objtool/builtin-check.c | 3 +-- tools/objtool/objtool.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
tools/objtool/builtin-check.c +1 -2
@@ -36,8 +36,7 @@#include "warn.h" #include <linux/hashtable.h> - -#define ARRAY_SIZE (x) (sizeof(x) / sizeof((x)[0])) +#include <linux/kernel.h> #define STATE_FP_SAVED 0x1#define STATE_FP_SETUP 0x2
tools/objtool/objtool.c +1 -2
@@ -31,11 +31,10 @@#include <stdlib.h> #include <subcmd/exec-cmd.h> #include <subcmd/pager.h> +#include <linux/kernel.h> #include "builtin.h" -#define ARRAY_SIZE (x) (sizeof(x)/sizeof(x[0])) -struct cmd_struct {const char *name;int (*fn)(int ,const char **);