History

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.

Arnaldo Carvalho de Melo committed 9 years ago

Commit 00614591 parent 877a7a12 files · +2 −4Browse files

Unified · Split

2 files
  1. tools/objtool/builtin-check.c +1 −2
  2. tools/objtool/objtool.c +1 −2
tools/objtool/builtin-check.c+1−2
@@ -36,8 +36,7 @@ · 35 unmodified lines
3636 #include "warn.h"
3737
3838 #include <linux/hashtable.h>
39−
40−#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
39+#include <linux/kernel.h>
4140
4241 #define STATE_FP_SAVED 0x1
4342 #define STATE_FP_SETUP 0x2
tools/objtool/objtool.c+1−2
@@ -31,11 +31,10 @@ · 30 unmodified lines
3131 #include <stdlib.h>
3232 #include <subcmd/exec-cmd.h>
3333 #include <subcmd/pager.h>
34+#include <linux/kernel.h>
3435
3536 #include "builtin.h"
3637
37−#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
38−
3938 struct cmd_struct {
4039 const char *name;
4140 int (*fn)(int, const char **);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t