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
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 0x141#define STATE_FP_SAVED 0x1
43#define STATE_FP_SETUP 0x242#define STATE_FP_SETUP 0x2
tools/objtool/objtool.c+1−2
@@ -31,11 +31,10 @@ · 30 unmodified lines
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 **);

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