Skip to contentSkip to conversation

linux: do_set_trap_table()'s argument can be const too

PATCH New Jan Beulich 1 participant 1 message Jan 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: do_set_trap_table()'s argument can be const too

As usual, written and tested on 2.6.24-rc7 and made apply to the 2.6.18 tree without further testing.

arch/i386/kernel/traps-xen.c +1 -1
Index: head-2008-01-08/arch/i386/kernel/traps-xen.c
===================================================================
@@ -1197,7 +1197,7 @@ void __init trap_init(void)
 
 void smp_trap_init(trap_info_t *trap_ctxt)
 {
-	trap_info_t *t = trap_table;
+	const trap_info_t *t = trap_table;
 
 	for (t = trap_table; t->address; t++) {
 		trap_ctxt[t->vector].flags = t->flags;
arch/x86_64/kernel/traps-xen.c +1 -1
Index: head-2008-01-08/arch/x86_64/kernel/traps-xen.c
===================================================================
@@ -1205,7 +1205,7 @@ void __init trap_init(void)
 
 void smp_trap_init(trap_info_t *trap_ctxt)
 {
-	trap_info_t *t = trap_table;
+	const trap_info_t *t = trap_table;
 
 	for (t = trap_table; t->address; t++) {
 		trap_ctxt[t->vector].flags = t->flags;
include/asm-i386/mach-xen/asm/hypercall.h +1 -1
Index: head-2007-12-11/include/asm-i386/mach-xen/asm/hypercall.h
===================================================================
@@ -128,7 +128,7 @@
 
 static inline int
 HYPERVISOR_set_trap_table(
-	trap_info_t *table)
+	const trap_info_t *table)
 {
 	return _hypercall1(int, set_trap_table, table);
 }
include/asm-x86_64/mach-xen/asm/hypercall.h +1 -1
Index: head-2007-12-11/include/asm-x86_64/mach-xen/asm/hypercall.h
===================================================================
@@ -134,7 +134,7 @@
 
 static inline int
 HYPERVISOR_set_trap_table(
-	trap_info_t *table)
+	const trap_info_t *table)
 {
 	return _hypercall1(int, set_trap_table, table);
 }