aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-08-23 10:20:14 -0400
committerJason Wessel <jason.wessel@windriver.com>2010-10-22 16:34:12 -0400
commit91b152aa85bbcf076e269565394c31964f940371 (patch)
tree32b2a8684877a15b050ef21c8ddcd583b695538d
parent75d14edee5689716b55afe467acfc13206a31f95 (diff)
kdb,kgdb: fix sparse fixups
Fix the following sparse warnings: kdb_main.c:328:5: warning: symbol 'kdbgetu64arg' was not declared. Should it be static? kgdboc.c:246:12: warning: symbol 'kgdboc_early_init' was not declared. Should it be static? kgdb.c:652:26: warning: incorrect type in argument 1 (different address spaces) kgdb.c:652:26: expected void const *ptr kgdb.c:652:26: got struct perf_event *[noderef] <asn:3>*pev The one in kgdb.c required the (void * __force) because of the return code from register_wide_hw_breakpoint looking like: return (void __percpu __force *)ERR_PTR(err); Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-rw-r--r--arch/x86/kernel/kgdb.c2
-rw-r--r--drivers/serial/kgdboc.c2
-rw-r--r--include/linux/kdb.h8
-rw-r--r--kernel/debug/kdb/kdb_private.h9
4 files changed, 11 insertions, 10 deletions
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 497f97386412..101bf22cf164 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -649,7 +649,7 @@ void kgdb_arch_late(void)
649 if (breakinfo[i].pev) 649 if (breakinfo[i].pev)
650 continue; 650 continue;
651 breakinfo[i].pev = register_wide_hw_breakpoint(&attr, NULL); 651 breakinfo[i].pev = register_wide_hw_breakpoint(&attr, NULL);
652 if (IS_ERR(breakinfo[i].pev)) { 652 if (IS_ERR((void * __force)breakinfo[i].pev)) {
653 printk(KERN_ERR "kgdb: Could not allocate hw" 653 printk(KERN_ERR "kgdb: Could not allocate hw"
654 "breakpoints\nDisabling the kernel debugger\n"); 654 "breakpoints\nDisabling the kernel debugger\n");
655 breakinfo[i].pev = NULL; 655 breakinfo[i].pev = NULL;
diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
index 39f9a1adaa75..d4b711c9a416 100644
--- a/drivers/serial/kgdboc.c
+++ b/drivers/serial/kgdboc.c
@@ -243,7 +243,7 @@ static struct kgdb_io kgdboc_io_ops = {
243 243
244#ifdef CONFIG_KGDB_SERIAL_CONSOLE 244#ifdef CONFIG_KGDB_SERIAL_CONSOLE
245/* This is only available if kgdboc is a built in for early debugging */ 245/* This is only available if kgdboc is a built in for early debugging */
246int __init kgdboc_early_init(char *opt) 246static int __init kgdboc_early_init(char *opt)
247{ 247{
248 /* save the first character of the config string because the 248 /* save the first character of the config string because the
249 * init routine can destroy it. 249 * init routine can destroy it.
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index deda197ced62..aadff7cc2b84 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -139,6 +139,14 @@ int kdb_process_cpu(const struct task_struct *p)
139 139
140/* kdb access to register set for stack dumping */ 140/* kdb access to register set for stack dumping */
141extern struct pt_regs *kdb_current_regs; 141extern struct pt_regs *kdb_current_regs;
142#ifdef CONFIG_KALLSYMS
143extern const char *kdb_walk_kallsyms(loff_t *pos);
144#else /* ! CONFIG_KALLSYMS */
145static inline const char *kdb_walk_kallsyms(loff_t *pos)
146{
147 return NULL;
148}
149#endif /* ! CONFIG_KALLSYMS */
142 150
143/* Dynamic kdb shell command registration */ 151/* Dynamic kdb shell command registration */
144extern int kdb_register(char *, kdb_func_t, char *, char *, short); 152extern int kdb_register(char *, kdb_func_t, char *, char *, short);
diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h
index 1921e6e4c0bc..35d69ed1dfb5 100644
--- a/kernel/debug/kdb/kdb_private.h
+++ b/kernel/debug/kdb/kdb_private.h
@@ -105,6 +105,7 @@ extern int kdb_getword(unsigned long *, unsigned long, size_t);
105extern int kdb_putword(unsigned long, unsigned long, size_t); 105extern int kdb_putword(unsigned long, unsigned long, size_t);
106 106
107extern int kdbgetularg(const char *, unsigned long *); 107extern int kdbgetularg(const char *, unsigned long *);
108extern int kdbgetu64arg(const char *, u64 *);
108extern char *kdbgetenv(const char *); 109extern char *kdbgetenv(const char *);
109extern int kdbgetaddrarg(int, const char **, int*, unsigned long *, 110extern int kdbgetaddrarg(int, const char **, int*, unsigned long *,
110 long *, char **); 111 long *, char **);
@@ -216,14 +217,6 @@ extern void kdb_ps1(const struct task_struct *p);
216extern void kdb_print_nameval(const char *name, unsigned long val); 217extern void kdb_print_nameval(const char *name, unsigned long val);
217extern void kdb_send_sig_info(struct task_struct *p, struct siginfo *info); 218extern void kdb_send_sig_info(struct task_struct *p, struct siginfo *info);
218extern void kdb_meminfo_proc_show(void); 219extern void kdb_meminfo_proc_show(void);
219#ifdef CONFIG_KALLSYMS
220extern const char *kdb_walk_kallsyms(loff_t *pos);
221#else /* ! CONFIG_KALLSYMS */
222static inline const char *kdb_walk_kallsyms(loff_t *pos)
223{
224 return NULL;
225}
226#endif /* ! CONFIG_KALLSYMS */
227extern char *kdb_getstr(char *, size_t, char *); 220extern char *kdb_getstr(char *, size_t, char *);
228 221
229/* Defines for kdb_symbol_print */ 222/* Defines for kdb_symbol_print */