linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kgdb: fix signedness mixmatches, add statics, add declaration to header
@ 2008-04-18 18:51 Harvey Harrison
  2008-04-21 20:24 ` Jason Wessel
  0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-04-18 18:51 UTC (permalink / raw)
  To: Ingo Molnar, Jason Wessel; +Cc: LKML

Noticed by sparse:
arch/x86/kernel/kgdb.c:556:15: warning: symbol 'kgdb_arch_pc' was not declared. Should it be static?
kernel/kgdb.c:149:8: warning: symbol 'kgdb_do_roundup' was not declared. Should it be static?
kernel/kgdb.c:193:22: warning: symbol 'kgdb_arch_pc' was not declared. Should it be static?
kernel/kgdb.c:712:5: warning: symbol 'remove_all_break' was not declared. Should it be static?

Related to kgdb_hex2long:
arch/x86/kernel/kgdb.c:371:28: warning: incorrect type in argument 2 (different signedness)
arch/x86/kernel/kgdb.c:371:28:    expected long *long_val
arch/x86/kernel/kgdb.c:371:28:    got unsigned long *<noident>
kernel/kgdb.c:469:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:469:27:    expected long *long_val
kernel/kgdb.c:469:27:    got unsigned long *<noident>
kernel/kgdb.c:470:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:470:27:    expected long *long_val
kernel/kgdb.c:470:27:    got unsigned long *<noident>
kernel/kgdb.c:894:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:894:27:    expected long *long_val
kernel/kgdb.c:894:27:    got unsigned long *<noident>
kernel/kgdb.c:895:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:895:27:    expected long *long_val
kernel/kgdb.c:895:27:    got unsigned long *<noident>
kernel/kgdb.c:1127:28: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:1127:28:    expected long *long_val
kernel/kgdb.c:1127:28:    got unsigned long *<noident>
kernel/kgdb.c:1132:25: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:1132:25:    expected long *long_val
kernel/kgdb.c:1132:25:    got unsigned long *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 include/linux/kgdb.h |    4 +++-
 kernel/kgdb.c        |    8 ++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 9757b1a..6adcc29 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -261,10 +261,12 @@ struct kgdb_io {
 
 extern struct kgdb_arch		arch_kgdb_ops;
 
+extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs);
+
 extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
 extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
 
-extern int kgdb_hex2long(char **ptr, long *long_val);
+extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
 extern int kgdb_mem2hex(char *mem, char *buf, int count);
 extern int kgdb_hex2mem(char *buf, char *mem, int count);
 
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index 1bd0ec1..39e31a0 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -61,7 +61,7 @@ struct kgdb_state {
 	int			err_code;
 	int			cpu;
 	int			pass_exception;
-	long			threadid;
+	unsigned long		threadid;
 	long			kgdb_usethreadid;
 	struct pt_regs		*linux_regs;
 };
@@ -146,7 +146,7 @@ atomic_t			kgdb_cpu_doing_single_step = ATOMIC_INIT(-1);
  * the other CPUs might interfere with your debugging context, so
  * use this with care:
  */
-int				kgdb_do_roundup = 1;
+static int kgdb_do_roundup = 1;
 
 static int __init opt_nokgdbroundup(char *str)
 {
@@ -438,7 +438,7 @@ int kgdb_hex2mem(char *buf, char *mem, int count)
  * While we find nice hex chars, build a long_val.
  * Return number of chars processed.
  */
-int kgdb_hex2long(char **ptr, long *long_val)
+int kgdb_hex2long(char **ptr, unsigned long *long_val)
 {
 	int hex_val;
 	int num = 0;
@@ -709,7 +709,7 @@ int kgdb_isremovedbreak(unsigned long addr)
 	return 0;
 }
 
-int remove_all_break(void)
+static int remove_all_break(void)
 {
 	unsigned long addr;
 	int error;
-- 
1.5.5.144.g3e42




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kgdb: fix signedness mixmatches, add statics, add declaration to header
  2008-04-18 18:51 [PATCH] kgdb: fix signedness mixmatches, add statics, add declaration to header Harvey Harrison
@ 2008-04-21 20:24 ` Jason Wessel
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Wessel @ 2008-04-21 20:24 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Ingo Molnar, LKML

Harvey Harrison wrote:
> Noticed by sparse:
> arch/x86/kernel/kgdb.c:556:15: warning: symbol 'kgdb_arch_pc' was not declared. Should it be static?
> kernel/kgdb.c:149:8: warning: symbol 'kgdb_do_roundup' was not declared. Should it be static?
> kernel/kgdb.c:193:22: warning: symbol 'kgdb_arch_pc' was not declared. Should it be static?
> kernel/kgdb.c:712:5: warning: symbol 'remove_all_break' was not declared. Should it be static?
>
> Related to kgdb_hex2long:
> arch/x86/kernel/kgdb.c:371:28: warning: incorrect type in argument 2 (different signedness)
> arch/x86/kernel/kgdb.c:371:28:    expected long *long_val
> arch/x86/kernel/kgdb.c:371:28:    got unsigned long *<noident>
> kernel/kgdb.c:469:27: warning: incorrect type in argument 2 (different signedness)
> kernel/kgdb.c:469:27:    expected long *long_val
> kernel/kgdb.c:469:27:    got unsigned long *<noident>
> kernel/kgdb.c:470:27: warning: incorrect type in argument 2 (different signedness)
> kernel/kgdb.c:470:27:    expected long *long_val
> kernel/kgdb.c:470:27:    got unsigned long *<noident>
> kernel/kgdb.c:894:27: warning: incorrect type in argument 2 (different signedness)
> kernel/kgdb.c:894:27:    expected long *long_val
> kernel/kgdb.c:894:27:    got unsigned long *<noident>
> kernel/kgdb.c:895:27: warning: incorrect type in argument 2 (different signedness)
> kernel/kgdb.c:895:27:    expected long *long_val
> kernel/kgdb.c:895:27:    got unsigned long *<noident>
> kernel/kgdb.c:1127:28: warning: incorrect type in argument 2 (different signedness)
> kernel/kgdb.c:1127:28:    expected long *long_val
> kernel/kgdb.c:1127:28:    got unsigned long *<noident>
> kernel/kgdb.c:1132:25: warning: incorrect type in argument 2 (different signedness)
> kernel/kgdb.c:1132:25:    expected long *long_val
> kernel/kgdb.c:1132:25:    got unsigned long *<noident>
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
>   

This patch looked fine Harvey, I queued it for the next pull request at:

http://git.kernel.org/?p=linux/kernel/git/jwessel/linux-2.6-kgdb.git;a=shortlog;h=for_linus

Jason.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-21 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-18 18:51 [PATCH] kgdb: fix signedness mixmatches, add statics, add declaration to header Harvey Harrison
2008-04-21 20:24 ` Jason Wessel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).