linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Weißschuh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux@weissschuh.net, Josh Poimboeuf <jpoimboe@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] objtool: Make struct entries[] static and const
Date: Sat, 04 Feb 2023 10:17:12 -0000	[thread overview]
Message-ID: <167550583213.4906.16896019408675810020.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221216-objtool-memory-v2-1-17968f85a464@weissschuh.net>

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

Commit-ID:     d93ee0553cf2e83c1696a18423bcf05b94b85e1d
Gitweb:        https://git.kernel.org/tip/d93ee0553cf2e83c1696a18423bcf05b94b85e1d
Author:        Thomas Weißschuh <linux@weissschuh.net>
AuthorDate:    Tue, 27 Dec 2022 16:00:57 
Committer:     Josh Poimboeuf <jpoimboe@kernel.org>
CommitterDate: Wed, 01 Feb 2023 09:15:22 -08:00

objtool: Make struct entries[] static and const

This data is not modified and not used outside of special.c.

Also adapt its users to the constness.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-1-17968f85a464@weissschuh.net
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 tools/objtool/special.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/objtool/special.c b/tools/objtool/special.c
index 9c8d827..baa85c3 100644
--- a/tools/objtool/special.c
+++ b/tools/objtool/special.c
@@ -26,7 +26,7 @@ struct special_entry {
 	unsigned char key; /* jump_label key */
 };
 
-struct special_entry entries[] = {
+static const struct special_entry entries[] = {
 	{
 		.sec = ".altinstructions",
 		.group = true,
@@ -65,7 +65,7 @@ static void reloc_to_sec_off(struct reloc *reloc, struct section **sec,
 	*off = reloc->sym->offset + reloc->addend;
 }
 
-static int get_alt_entry(struct elf *elf, struct special_entry *entry,
+static int get_alt_entry(struct elf *elf, const struct special_entry *entry,
 			 struct section *sec, int idx,
 			 struct special_alt *alt)
 {
@@ -139,7 +139,7 @@ static int get_alt_entry(struct elf *elf, struct special_entry *entry,
  */
 int special_get_alts(struct elf *elf, struct list_head *alts)
 {
-	struct special_entry *entry;
+	const struct special_entry *entry;
 	struct section *sec;
 	unsigned int nr_entries;
 	struct special_alt *alt;

  parent reply	other threads:[~2023-02-04 10:17 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 16:00 [PATCH v2 0/8] reduce maximum memory usage Thomas Weißschuh
2022-12-27 16:00 ` [PATCH v2 1/8] objtool: make struct entries[] static and const Thomas Weißschuh
2023-02-01 16:26   ` [tip: objtool/core] objtool: Make " tip-bot2 for Thomas Weißschuh
2023-02-04 10:17   ` tip-bot2 for Thomas Weißschuh [this message]
2022-12-27 16:00 ` [PATCH v2 2/8] objtool: make struct check_options static Thomas Weißschuh
2023-02-01 16:26   ` [tip: objtool/core] objtool: Make " tip-bot2 for Thomas Weißschuh
2023-02-04 10:17   ` tip-bot2 for Thomas Weißschuh
2022-12-27 16:00 ` [PATCH v2 3/8] objtool: allocate multiple structures with calloc() Thomas Weißschuh
2023-01-30 23:53   ` Josh Poimboeuf
2023-02-01 16:26   ` [tip: objtool/core] objtool: Allocate " tip-bot2 for Thomas Weißschuh
2023-02-04 10:17   ` tip-bot2 for Thomas Weißschuh
2022-12-27 16:01 ` [PATCH v2 4/8] objtool: introduce function elf_reloc_set_type Thomas Weißschuh
2022-12-27 16:01 ` [PATCH v2 5/8] objtool: reduce memory usage of struct reloc Thomas Weißschuh
2022-12-29  1:33   ` Rong Tao
2022-12-29  2:26     ` Thomas Weißschuh
2022-12-29  3:29       ` Rong Tao
2022-12-29  5:57         ` Thomas Weißschuh
2023-01-30 23:59   ` Josh Poimboeuf
2022-12-27 16:01 ` [PATCH v2 6/8] objtool: optimize layout of struct symbol Thomas Weißschuh
2023-02-01 16:26   ` [tip: objtool/core] objtool: Optimize " tip-bot2 for Thomas Weißschuh
2023-02-04 10:17   ` tip-bot2 for Thomas Weißschuh
2022-12-27 16:01 ` [PATCH v2 7/8] objtool: optimize layout of struct special_alt Thomas Weißschuh
2023-02-01 16:26   ` [tip: objtool/core] objtool: Optimize " tip-bot2 for Thomas Weißschuh
2023-02-04 10:17   ` tip-bot2 for Thomas Weißschuh
2022-12-27 16:01 ` [PATCH v2 8/8] objtool: explicitly cleanup resources on success Thomas Weißschuh
2023-01-31  0:02   ` Josh Poimboeuf
2023-01-29 21:43 ` [PATCH v2 0/8] objtool: reduce maximum memory usage Thomas Weißschuh
2023-01-31  0:03   ` Josh Poimboeuf
2023-01-31  3:54     ` Thomas Weißschuh
2023-01-31 17:27       ` Josh Poimboeuf
2023-02-07 17:30         ` Josh Poimboeuf
2023-02-01 12:51       ` David Laight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167550583213.4906.16896019408675810020.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).