mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/insn: make unexported tables static
@ 2026-01-07 10:44 Ben Dooks
  0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2026-01-07 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, mingo, bp, dave.hansen, x86, mhiramat, Ben Dooks

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-07 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-07 10:44 [PATCH] x86/insn: make unexported tables static Ben Dooks

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®