forked from luck/tmp_suning_uos_patched
kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops
checkpatch.pl reports the following: WARNING: struct kgdb_arch should normally be const #28: FILE: arch/mips/kernel/kgdb.c:397: +struct kgdb_arch arch_kgdb_ops = { This report makes sense, as all other ops struct, this one should also be const. This patch does the change. Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: Ley Foon Tan <lftan@altera.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Rich Felker <dalias@libc.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: x86@kernel.org Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Paul Burton <paul.burton@mips.com> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Borislav Petkov <bp@suse.de> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
This commit is contained in:
parent
911b7afdeb
commit
cc0282975b
|
@ -198,7 +198,7 @@ void kgdb_call_nmi_hook(void *ignored)
|
|||
kgdb_nmicallback(raw_smp_processor_id(), NULL);
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* breakpoint instruction: TRAP_S 0x3 */
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
.gdb_bpt_instr = {0x78, 0x7e},
|
||||
|
|
|
@ -262,7 +262,7 @@ int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
|
|||
* and we handle the normal undef case within the do_undefinstr
|
||||
* handler.
|
||||
*/
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
#ifndef __ARMEB__
|
||||
.gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
|
||||
#else /* ! __ARMEB__ */
|
||||
|
|
|
@ -345,7 +345,7 @@ void kgdb_arch_exit(void)
|
|||
unregister_die_notifier(&kgdb_notifier);
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops;
|
||||
const struct kgdb_arch arch_kgdb_ops;
|
||||
|
||||
int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ void kgdb_arch_exit(void)
|
|||
/* Nothing to do */
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* Breakpoint instruction: trapa #2 */
|
||||
.gdb_bpt_instr = { 0x57, 0x20 },
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = {
|
|||
{ "syscall_nr", GDB_SIZEOF_REG, offsetof(struct pt_regs, syscall_nr)},
|
||||
};
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* trap0(#0xDB) 0x0cdb0054 */
|
||||
.gdb_bpt_instr = {0x54, 0x00, 0xdb, 0x0c},
|
||||
};
|
||||
|
|
|
@ -143,7 +143,7 @@ void kgdb_arch_exit(void)
|
|||
/*
|
||||
* Global data
|
||||
*/
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
#ifdef __MICROBLAZEEL__
|
||||
.gdb_bpt_instr = {0x18, 0x00, 0x0c, 0xba}, /* brki r16, 0x18 */
|
||||
#else
|
||||
|
|
|
@ -387,7 +387,7 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
|
|||
return -1;
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
.gdb_bpt_instr = { spec_op << 2, 0x00, 0x00, break_op },
|
||||
#else
|
||||
|
|
|
@ -165,7 +165,7 @@ void kgdb_arch_exit(void)
|
|||
/* Nothing to do */
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* Breakpoint instruction: trap 30 */
|
||||
.gdb_bpt_instr = { 0xba, 0x6f, 0x3b, 0x00 },
|
||||
};
|
||||
|
|
|
@ -477,7 +477,7 @@ int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
|
|||
/*
|
||||
* Global data
|
||||
*/
|
||||
struct kgdb_arch arch_kgdb_ops;
|
||||
const struct kgdb_arch arch_kgdb_ops;
|
||||
|
||||
static int kgdb_not_implemented(struct pt_regs *regs)
|
||||
{
|
||||
|
|
|
@ -370,7 +370,7 @@ void kgdb_arch_exit(void)
|
|||
unregister_die_notifier(&kgdb_notifier);
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* Breakpoint instruction: trapa #0x3c */
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
.gdb_bpt_instr = { 0x3c, 0xc3 },
|
||||
|
|
|
@ -166,7 +166,7 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
|
|||
regs->npc = regs->pc + 4;
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* Breakpoint instruction: ta 0x7d */
|
||||
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d },
|
||||
};
|
||||
|
|
|
@ -195,7 +195,7 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
|
|||
regs->tnpc = regs->tpc + 4;
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* Breakpoint instruction: ta 0x72 */
|
||||
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },
|
||||
};
|
||||
|
|
|
@ -799,7 +799,7 @@ int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
|
|||
(char *)bpt->saved_instr, BREAK_INSTR_SIZE);
|
||||
}
|
||||
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
const struct kgdb_arch arch_kgdb_ops = {
|
||||
/* Breakpoint instruction: */
|
||||
.gdb_bpt_instr = { 0xcc },
|
||||
.flags = KGDB_HW_BREAKPOINT,
|
||||
|
|
|
@ -287,7 +287,7 @@ struct kgdb_io {
|
|||
int is_console;
|
||||
};
|
||||
|
||||
extern struct kgdb_arch arch_kgdb_ops;
|
||||
extern const struct kgdb_arch arch_kgdb_ops;
|
||||
|
||||
extern unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user