diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-05 09:08:44 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-05 09:11:24 -0400 |
commit | 09d9bae064724635df3920bcca47e077cfb23e76 (patch) | |
tree | a42fa183dbdbd69854866c0b1f0169f0286b45d4 /arch | |
parent | 22acc4e65043d436bc286e6059960fa533e37356 (diff) |
[ARM] sparse: fix several warnings
arch/arm/kernel/process.c:270:6: warning: symbol 'show_fpregs' was not declared. Should it be static?
This function isn't used, so can be removed.
arch/arm/kernel/setup.c:532:9: warning: symbol 'len' shadows an earlier one
arch/arm/kernel/setup.c:524:6: originally declared here
A function containing two 'len's.
arch/arm/mm/fault-armv.c:188:13: warning: symbol 'check_writebuffer_bugs' was not declared. Should it be static?
arch/arm/mm/mmap.c:122:5: warning: symbol 'valid_phys_addr_range' was not declared. Should it be static?
arch/arm/mm/mmap.c:137:5: warning: symbol 'valid_mmap_phys_addr_range' was not declared. Should it be static?
Missing includes.
arch/arm/kernel/traps.c:71:77: warning: Using plain integer as NULL pointer
arch/arm/mm/ioremap.c:355:46: error: incompatible types in comparison expression (different address spaces)
Sillies.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/process.c | 29 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 6 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 3 | ||||
-rw-r--r-- | arch/arm/mm/fault-armv.c | 1 | ||||
-rw-r--r-- | arch/arm/mm/ioremap.c | 9 | ||||
-rw-r--r-- | arch/arm/mm/mmap.c | 1 |
6 files changed, 11 insertions, 38 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 3fd882337064..a2e75420858e 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -267,35 +267,6 @@ void show_regs(struct pt_regs * regs) | |||
267 | __backtrace(); | 267 | __backtrace(); |
268 | } | 268 | } |
269 | 269 | ||
270 | void show_fpregs(struct user_fp *regs) | ||
271 | { | ||
272 | int i; | ||
273 | |||
274 | for (i = 0; i < 8; i++) { | ||
275 | unsigned long *p; | ||
276 | char type; | ||
277 | |||
278 | p = (unsigned long *)(regs->fpregs + i); | ||
279 | |||
280 | switch (regs->ftype[i]) { | ||
281 | case 1: type = 'f'; break; | ||
282 | case 2: type = 'd'; break; | ||
283 | case 3: type = 'e'; break; | ||
284 | default: type = '?'; break; | ||
285 | } | ||
286 | if (regs->init_flag) | ||
287 | type = '?'; | ||
288 | |||
289 | printk(" f%d(%c): %08lx %08lx %08lx%c", | ||
290 | i, type, p[0], p[1], p[2], i & 1 ? '\n' : ' '); | ||
291 | } | ||
292 | |||
293 | |||
294 | printk("FPSR: %08lx FPCR: %08lx\n", | ||
295 | (unsigned long)regs->fpsr, | ||
296 | (unsigned long)regs->fpcr); | ||
297 | } | ||
298 | |||
299 | /* | 270 | /* |
300 | * Free current thread data structures etc.. | 271 | * Free current thread data structures etc.. |
301 | */ | 272 | */ |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index e90422d374af..67d20e9a7451 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -529,12 +529,12 @@ static void __init parse_cmdline(char **cmdline_p, char *from) | |||
529 | struct early_params *p; | 529 | struct early_params *p; |
530 | 530 | ||
531 | for (p = &__early_begin; p < &__early_end; p++) { | 531 | for (p = &__early_begin; p < &__early_end; p++) { |
532 | int len = strlen(p->arg); | 532 | int arglen = strlen(p->arg); |
533 | 533 | ||
534 | if (memcmp(from, p->arg, len) == 0) { | 534 | if (memcmp(from, p->arg, arglen) == 0) { |
535 | if (to != command_line) | 535 | if (to != command_line) |
536 | to -= 1; | 536 | to -= 1; |
537 | from += len; | 537 | from += arglen; |
538 | p->fn(&from); | 538 | p->fn(&from); |
539 | 539 | ||
540 | while (*from != ' ' && *from != '\0') | 540 | while (*from != ' ' && *from != '\0') |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 46e2c8315a33..13f8f1860f75 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -68,7 +68,8 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long | |||
68 | */ | 68 | */ |
69 | static int verify_stack(unsigned long sp) | 69 | static int verify_stack(unsigned long sp) |
70 | { | 70 | { |
71 | if (sp < PAGE_OFFSET || (sp > (unsigned long)high_memory && high_memory != 0)) | 71 | if (sp < PAGE_OFFSET || |
72 | (sp > (unsigned long)high_memory && high_memory != NULL)) | ||
72 | return -EFAULT; | 73 | return -EFAULT; |
73 | 74 | ||
74 | return 0; | 75 | return 0; |
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index dbdb7b72f2c1..af6ed6ef9a81 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | 19 | ||
20 | #include <asm/bugs.h> | ||
20 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
21 | #include <asm/cachetype.h> | 22 | #include <asm/cachetype.h> |
22 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 20e4454e452e..52e5a4d28eb7 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -333,15 +333,14 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | |||
333 | } | 333 | } |
334 | EXPORT_SYMBOL(__arm_ioremap); | 334 | EXPORT_SYMBOL(__arm_ioremap); |
335 | 335 | ||
336 | void __iounmap(volatile void __iomem *addr) | 336 | void __iounmap(volatile void __iomem *io_addr) |
337 | { | 337 | { |
338 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); | ||
338 | #ifndef CONFIG_SMP | 339 | #ifndef CONFIG_SMP |
339 | struct vm_struct **p, *tmp; | 340 | struct vm_struct **p, *tmp; |
340 | #endif | 341 | #endif |
341 | unsigned int section_mapping = 0; | 342 | unsigned int section_mapping = 0; |
342 | 343 | ||
343 | addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr); | ||
344 | |||
345 | #ifndef CONFIG_SMP | 344 | #ifndef CONFIG_SMP |
346 | /* | 345 | /* |
347 | * If this is a section based mapping we need to handle it | 346 | * If this is a section based mapping we need to handle it |
@@ -352,7 +351,7 @@ void __iounmap(volatile void __iomem *addr) | |||
352 | */ | 351 | */ |
353 | write_lock(&vmlist_lock); | 352 | write_lock(&vmlist_lock); |
354 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { | 353 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { |
355 | if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { | 354 | if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { |
356 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { | 355 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { |
357 | *p = tmp->next; | 356 | *p = tmp->next; |
358 | unmap_area_sections((unsigned long)tmp->addr, | 357 | unmap_area_sections((unsigned long)tmp->addr, |
@@ -367,6 +366,6 @@ void __iounmap(volatile void __iomem *addr) | |||
367 | #endif | 366 | #endif |
368 | 367 | ||
369 | if (!section_mapping) | 368 | if (!section_mapping) |
370 | vunmap((void __force *)addr); | 369 | vunmap(addr); |
371 | } | 370 | } |
372 | EXPORT_SYMBOL(__iounmap); | 371 | EXPORT_SYMBOL(__iounmap); |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 28ead8393b5a..5358fcc7f61e 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/mman.h> | 6 | #include <linux/mman.h> |
7 | #include <linux/shm.h> | 7 | #include <linux/shm.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/io.h> | ||
9 | #include <asm/cputype.h> | 10 | #include <asm/cputype.h> |
10 | #include <asm/system.h> | 11 | #include <asm/system.h> |
11 | 12 | ||