diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-04-21 15:39:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-29 01:12:25 -0400 |
commit | d191723feeb986e9c228a74a0a1c1fb0b5735052 (patch) | |
tree | 83828f6d17855886ba358e0f37825995a6d09932 | |
parent | c31f76518e3b3d755a24db43e556869cafce6d64 (diff) |
sparc32: fix sparse warnings in setup_32.c
Fix following warnings:
setup_32.c:106:15: warning: symbol 'cmdline_memory_size' was not declared. Should it be static?
setup_32.c:270:16: warning: symbol 'fake_swapper_regs' was not declared. Should it be static?
setup_32.c:368:55: warning: Using plain integer as NULL pointer
Add missing declaration of cmdline_memory_size and remove the local one in init_32.c
fake_swapper_regs was only used locally - so defined static.
When replacing 0 with NULL also add a few spaces around operators
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/include/asm/setup.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/mm/init_32.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h index 4b7465a8219a..c7cd435f919f 100644 --- a/arch/sparc/include/asm/setup.h +++ b/arch/sparc/include/asm/setup.h | |||
@@ -36,6 +36,9 @@ extern unsigned long pdma_areasize; | |||
36 | 36 | ||
37 | int sparc_floppy_request_irq(unsigned int irq, irq_handler_t irq_handler); | 37 | int sparc_floppy_request_irq(unsigned int irq, irq_handler_t irq_handler); |
38 | 38 | ||
39 | /* setup_32.c */ | ||
40 | extern unsigned long cmdline_memory_size; | ||
41 | |||
39 | #endif | 42 | #endif |
40 | 43 | ||
41 | extern void sun_do_break(void); | 44 | extern void sun_do_break(void); |
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 1434526970a6..baef495c06bd 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -267,7 +267,7 @@ static __init void leon_patch(void) | |||
267 | } | 267 | } |
268 | 268 | ||
269 | struct tt_entry *sparc_ttable; | 269 | struct tt_entry *sparc_ttable; |
270 | struct pt_regs fake_swapper_regs; | 270 | static struct pt_regs fake_swapper_regs; |
271 | 271 | ||
272 | /* Called from head_32.S - before we have setup anything | 272 | /* Called from head_32.S - before we have setup anything |
273 | * in the kernel. Be very careful with what you do here. | 273 | * in the kernel. Be very careful with what you do here. |
@@ -365,7 +365,7 @@ void __init setup_arch(char **cmdline_p) | |||
365 | 365 | ||
366 | prom_setsync(prom_sync_me); | 366 | prom_setsync(prom_sync_me); |
367 | 367 | ||
368 | if((boot_flags&BOOTME_DEBUG) && (linux_dbvec!=0) && | 368 | if((boot_flags & BOOTME_DEBUG) && (linux_dbvec != NULL) && |
369 | ((*(short *)linux_dbvec) != -1)) { | 369 | ((*(short *)linux_dbvec) != -1)) { |
370 | printk("Booted under KADB. Syncing trap table.\n"); | 370 | printk("Booted under KADB. Syncing trap table.\n"); |
371 | (*(linux_dbvec->teach_debugger))(); | 371 | (*(linux_dbvec->teach_debugger))(); |
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index cf09e6e9e18d..d0c732727f44 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
32 | #include <asm/vaddrs.h> | 32 | #include <asm/vaddrs.h> |
33 | #include <asm/pgalloc.h> /* bug in asm-generic/tlb.h: check_pgt_cache */ | 33 | #include <asm/pgalloc.h> /* bug in asm-generic/tlb.h: check_pgt_cache */ |
34 | #include <asm/setup.h> | ||
34 | #include <asm/tlb.h> | 35 | #include <asm/tlb.h> |
35 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
36 | #include <asm/leon.h> | 37 | #include <asm/leon.h> |
@@ -65,7 +66,6 @@ void show_mem(unsigned int filter) | |||
65 | } | 66 | } |
66 | 67 | ||
67 | 68 | ||
68 | extern unsigned long cmdline_memory_size; | ||
69 | unsigned long last_valid_pfn; | 69 | unsigned long last_valid_pfn; |
70 | 70 | ||
71 | unsigned long calc_highpages(void) | 71 | unsigned long calc_highpages(void) |