Skip to content

Commit 21431c2

Browse files
committed
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: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
1 parent 27029c3 commit 21431c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/x86/kernel/kgdb.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
121121
memcpy(mem, (void *)regs + dbg_reg_def[regno].offset,
122122
dbg_reg_def[regno].size);
123123

124-
switch (regno) {
125124
#ifdef CONFIG_X86_32
125+
switch (regno) {
126126
case GDB_SS:
127127
if (!user_mode_vm(regs))
128128
*(unsigned long *)mem = __KERNEL_DS;
@@ -135,8 +135,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
135135
case GDB_FS:
136136
*(unsigned long *)mem = 0xFFFF;
137137
break;
138-
#endif
139138
}
139+
#endif
140140
return dbg_reg_def[regno].name;
141141
}
142142

0 commit comments

Comments
 (0)