From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, mhiramat@redhat.com,
Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] x86/insn: make unexported tables static
Date: Wed, 7 Jan 2026 10:44:36 +0000 [thread overview]
Message-ID: <20260107104436.164184-1-ben.dooks@codethink.co.uk> (raw)
None of the insn_attr_t tables outside of the main arrays
are exported to anything else by name. These are causing
a lot of warnings, so make them static.
Fixes some of the following sparse warnings:
arch/x86/lib/inat-tables.c:233:19: warning: symbol 'inat_escape_table_1' was not declared. Should it be static?
arch/x86/lib/inat-tables.c:457:19: warning: symbol 'inat_escape_table_1_1' was not declared. Should it be static?
arch/x86/lib/inat-tables.c:585:19: warning: symbol 'inat_escape_table_1_2' was not declared. Should it be static?
arch/x86/lib/inat-tables.c:621:19: warning: symbol 'inat_escape_table_1_3' was not declared. Should it be static?
arch/x86/lib/inat-tables.c:659:19: warning: symbol 'inat_escape_table_2' was not declared. Should it be static?
...
Fixes: eb13296cfaf6c6995 ("x86: Instruction decoder API")
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
arch/x86/tools/gen-insn-attr-x86.awk | 2 +-
tools/arch/x86/tools/gen-insn-attr-x86.awk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk
index 7ea1b75e59b7..c4319f170f2b 100644
--- a/arch/x86/tools/gen-insn-attr-x86.awk
+++ b/arch/x86/tools/gen-insn-attr-x86.awk
@@ -188,7 +188,7 @@ function array_size(arr, i,c) {
function print_table(tbl,name,fmt,n)
{
- print "const insn_attr_t " name " = {"
+ print "static const insn_attr_t " name " = {"
for (i = 0; i < n; i++) {
id = sprintf(fmt, i)
if (tbl[id])
diff --git a/tools/arch/x86/tools/gen-insn-attr-x86.awk b/tools/arch/x86/tools/gen-insn-attr-x86.awk
index 7ea1b75e59b7..c4319f170f2b 100644
--- a/tools/arch/x86/tools/gen-insn-attr-x86.awk
+++ b/tools/arch/x86/tools/gen-insn-attr-x86.awk
@@ -188,7 +188,7 @@ function array_size(arr, i,c) {
function print_table(tbl,name,fmt,n)
{
- print "const insn_attr_t " name " = {"
+ print "static const insn_attr_t " name " = {"
for (i = 0; i < n; i++) {
id = sprintf(fmt, i)
if (tbl[id])
--
2.37.2.352.g3c44437643
reply other threads:[~2026-01-07 10:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260107104436.164184-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®