From: Jason Wessel <jason.wessel@windriver.com>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64,kgdb: add default case into a switch
Date: Mon, 22 Nov 2010 08:39:41 -0600 [thread overview]
Message-ID: <4CEA80AD.2030804@windriver.com> (raw)
In-Reply-To: <1290409375-28187-1-git-send-email-namhyung@gmail.com>
On 11/22/2010 01:02 AM, Namhyung Kim wrote:
> This fixes following sparse warning on x86_64:
>
> arch/x86/kernel/kgdb.c:123:9: warning: switch with no cases
>
Thanks for the report on this.
The preferred fix for the warning is below, and I'll queue it for the 2.6.38 merge window.
Thanks,
Jason.
--
From: Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH] kgdb,x86_64: fix compile warning found with sparse
Date: Mon Nov 22 08:38:04 CST 2010
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>
---
arch/x86/kernel/kgdb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -120,8 +120,8 @@ char *dbg_get_reg(int regno, void *mem,
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;
@@ -134,8 +134,8 @@ char *dbg_get_reg(int regno, void *mem,
case GDB_FS:
*(unsigned long *)mem = 0xFFFF;
break;
-#endif
}
+#endif
return dbg_reg_def[regno].name;
}
next prev parent reply other threads:[~2010-11-22 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 7:02 Namhyung Kim
2010-11-22 14:39 ` Jason Wessel [this message]
2010-11-23 3:21 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CEA80AD.2030804@windriver.com \
--to=jason.wessel@windriver.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome