Skip to content

Commit

Permalink
kgdb,x86_64: fix compile warning found with sparse
Browse files Browse the repository at this point in the history
Fix sparse warning:

arch/x86/kernel/kgdb.c:123:9: warning: switch with no cases

Reported-by: Namhyung Kim <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
  • Loading branch information
jwessel committed Mar 25, 2011
1 parent 27029c3 commit 21431c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
dbg_reg_def[regno].size);

switch (regno) {
#ifdef CONFIG_X86_32
switch (regno) {
case GDB_SS:
if (!user_mode_vm(regs))
*(unsigned long *)mem = __KERNEL_DS;
Expand All @@ -135,8 +135,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
case GDB_FS:
*(unsigned long *)mem = 0xFFFF;
break;
#endif
}
#endif
return dbg_reg_def[regno].name;
}

Expand Down

0 comments on commit 21431c2

Please sign in to comment.