[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260107104436.164184-1-ben.dooks@codethink.co.uk>
Date: Wed, 7 Jan 2026 10:44:36 +0000
From: Ben Dooks <ben.dooks@...ethink.co.uk>
To: linux-kernel@...r.kernel.org
Cc: tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
x86@...nel.org,
mhiramat@...hat.com,
Ben Dooks <ben.dooks@...ethink.co.uk>
Subject: [PATCH] x86/insn: make unexported tables static
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@...ethink.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
Powered by blists - more mailing lists