Commit 21431c29 authored by Jason Wessel's avatar Jason Wessel

kgdb,x86_64: fix compile warning found with sparse

Fix sparse warning:

arch/x86/kernel/kgdb.c:123:9: warning: switch with no cases
Reported-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
parent 27029c33
...@@ -121,8 +121,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) ...@@ -121,8 +121,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, memcpy(mem, (void *)regs + dbg_reg_def[regno].offset,
dbg_reg_def[regno].size); dbg_reg_def[regno].size);
switch (regno) {
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
switch (regno) {
case GDB_SS: case GDB_SS:
if (!user_mode_vm(regs)) if (!user_mode_vm(regs))
*(unsigned long *)mem = __KERNEL_DS; *(unsigned long *)mem = __KERNEL_DS;
...@@ -135,8 +135,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) ...@@ -135,8 +135,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
case GDB_FS: case GDB_FS:
*(unsigned long *)mem = 0xFFFF; *(unsigned long *)mem = 0xFFFF;
break; break;
#endif
} }
#endif
return dbg_reg_def[regno].name; return dbg_reg_def[regno].name;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment