2022-12-27 16:05:54

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH v2 2/8] objtool: make struct check_options static

It is not used outside of builtin-check.c.

Also remove the unused declaration from builtin.h .

Signed-off-by: Thomas Weißschuh <[email protected]>
---
tools/objtool/builtin-check.c | 2 +-
tools/objtool/include/objtool/builtin.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index a4f39407bf59..7c175198d09f 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -65,7 +65,7 @@ static int parse_hacks(const struct option *opt, const char *str, int unset)
return found ? 0 : -1;
}

-const struct option check_options[] = {
+static const struct option check_options[] = {
OPT_GROUP("Actions:"),
OPT_CALLBACK_OPTARG('h', "hacks", NULL, NULL, "jump_label,noinstr,skylake", "patch toolchain bugs/limitations", parse_hacks),
OPT_BOOLEAN('i', "ibt", &opts.ibt, "validate and annotate IBT"),
diff --git a/tools/objtool/include/objtool/builtin.h b/tools/objtool/include/objtool/builtin.h
index fa45044e3863..2a108e648b7a 100644
--- a/tools/objtool/include/objtool/builtin.h
+++ b/tools/objtool/include/objtool/builtin.h
@@ -7,8 +7,6 @@

#include <subcmd/parse-options.h>

-extern const struct option check_options[];
-
struct opts {
/* actions: */
bool dump_orc;

--
2.39.0


Subject: [tip: objtool/core] objtool: Make struct check_options static

The following commit has been merged into the objtool/core branch of tip:

Commit-ID: 3b066cdf0893993dcbfabe9ac443e6ff84df6218
Gitweb: https://git.kernel.org/tip/3b066cdf0893993dcbfabe9ac443e6ff84df6218
Author: Thomas Weißschuh <[email protected]>
AuthorDate: Tue, 27 Dec 2022 16:00:58
Committer: Josh Poimboeuf <[email protected]>
CommitterDate: Mon, 30 Jan 2023 16:28:18 -08:00

objtool: Make struct check_options static

It is not used outside of builtin-check.c.

Also remove the unused declaration from builtin.h .

Signed-off-by: Thomas Weißschuh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Josh Poimboeuf <[email protected]>
---
tools/objtool/builtin-check.c | 2 +-
tools/objtool/include/objtool/builtin.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index a4f3940..7c17519 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -65,7 +65,7 @@ static int parse_hacks(const struct option *opt, const char *str, int unset)
return found ? 0 : -1;
}

-const struct option check_options[] = {
+static const struct option check_options[] = {
OPT_GROUP("Actions:"),
OPT_CALLBACK_OPTARG('h', "hacks", NULL, NULL, "jump_label,noinstr,skylake", "patch toolchain bugs/limitations", parse_hacks),
OPT_BOOLEAN('i', "ibt", &opts.ibt, "validate and annotate IBT"),
diff --git a/tools/objtool/include/objtool/builtin.h b/tools/objtool/include/objtool/builtin.h
index fa45044..2a108e6 100644
--- a/tools/objtool/include/objtool/builtin.h
+++ b/tools/objtool/include/objtool/builtin.h
@@ -7,8 +7,6 @@

#include <subcmd/parse-options.h>

-extern const struct option check_options[];
-
struct opts {
/* actions: */
bool dump_orc;

Subject: [tip: objtool/core] objtool: Make struct check_options static

The following commit has been merged into the objtool/core branch of tip:

Commit-ID: cfd66e81799f4a2fdc6447fa99bdb1871f45ff08
Gitweb: https://git.kernel.org/tip/cfd66e81799f4a2fdc6447fa99bdb1871f45ff08
Author: Thomas Weißschuh <[email protected]>
AuthorDate: Tue, 27 Dec 2022 16:00:58
Committer: Josh Poimboeuf <[email protected]>
CommitterDate: Wed, 01 Feb 2023 09:15:23 -08:00

objtool: Make struct check_options static

It is not used outside of builtin-check.c.

Also remove the unused declaration from builtin.h .

Signed-off-by: Thomas Weißschuh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Josh Poimboeuf <[email protected]>
---
tools/objtool/builtin-check.c | 2 +-
tools/objtool/include/objtool/builtin.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index a4f3940..7c17519 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -65,7 +65,7 @@ static int parse_hacks(const struct option *opt, const char *str, int unset)
return found ? 0 : -1;
}

-const struct option check_options[] = {
+static const struct option check_options[] = {
OPT_GROUP("Actions:"),
OPT_CALLBACK_OPTARG('h', "hacks", NULL, NULL, "jump_label,noinstr,skylake", "patch toolchain bugs/limitations", parse_hacks),
OPT_BOOLEAN('i', "ibt", &opts.ibt, "validate and annotate IBT"),
diff --git a/tools/objtool/include/objtool/builtin.h b/tools/objtool/include/objtool/builtin.h
index fa45044..2a108e6 100644
--- a/tools/objtool/include/objtool/builtin.h
+++ b/tools/objtool/include/objtool/builtin.h
@@ -7,8 +7,6 @@

#include <subcmd/parse-options.h>

-extern const struct option check_options[];
-
struct opts {
/* actions: */
bool dump_orc;