lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Apr 2017 04:04:58 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     adrian.hunter@...el.com, hpa@...or.com, dsahern@...il.com,
        mingo@...nel.org, wangnan0@...wei.com, acme@...hat.com,
        jolsa@...nel.org, jpoimboe@...hat.com, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, namhyung@...nel.org
Subject: [tip:perf/core] objtool: Drop ARRAY_SIZE() definition,
 tools/include/linux/kernel.h has it now

Commit-ID:  0061459744cb985ef31a484bcd9b2fc3cfd01c1b
Gitweb:     http://git.kernel.org/tip/0061459744cb985ef31a484bcd9b2fc3cfd01c1b
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Mon, 17 Apr 2017 11:58:55 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
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 <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-roiwxwgwgld4kygn65if60wa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/objtool/builtin-check.c | 3 +--
 tools/objtool/objtool.c       | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index 066086d..282a603 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -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
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index 46c326d..ecc5b1b 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -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 **);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ