]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Fix the error of using "const" in gen-insn-attr-x86.awk
authorCong Ding <dinggnu@gmail.com>
Sun, 9 Dec 2012 08:21:04 +0000 (08:21 +0000)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 10 Dec 2012 18:31:24 +0000 (10:31 -0800)
commit223b41e89a25312674cb4705a230a66054f8b20b
treea9b304222f9224d9618949931358bacc16751770
parent1f672dc8047a40888b17408b6b1951bfbd5e8cff
x86: Fix the error of using "const" in gen-insn-attr-x86.awk

The original version code causes following sparse warnings:
arch/x86/lib/inat-tables.c:1080:25: warning: duplicate const
arch/x86/lib/inat-tables.c:1095:25: warning: duplicate const
arch/x86/lib/inat-tables.c:1118:25: warning: duplicate const

for the variables inat_escape_tables, inat_group_tables, and inat_avx_tables
in the code generated by gen-insn-attr-x86.awk.

The author Masami Hiramutsu says here is to make both the value pointed by the
pointers and the pointers itself read-only, so we move the "const" to be after
the "*".

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Link: http://lkml.kernel.org/r/20121209082103.GA9181@gmail.com
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/tools/gen-insn-attr-x86.awk