diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-04-21 15:39:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-29 01:12:25 -0400 |
commit | e8c29c839b5c9f6704c7105e1248b476e8f4c04e (patch) | |
tree | fc91a239159bc424946ae461469b69031616185a /arch/sparc/mm | |
parent | 4c9660f796fca741013e9ea7fc32db0638d0d193 (diff) |
sparc32: fix sparse warnings in srmmu.c
Fix following warnings:
srmmu.c:78:5: warning: symbol 'flush_page_for_dma_global' was not declared. Should it be static?
srmmu.c:85:5: warning: symbol 'viking_mxcc_present' was not declared. Should it be static?
srmmu.c:103:6: warning: symbol 'srmmu_nocache_bitmap' was not declared. Should it be static?
srmmu.c:176:24: warning: Using plain integer as NULL pointer
srmmu.c:731:46: warning: Using plain integer as NULL pointer
srmmu.c:731:46: warning: Using plain integer as NULL pointer
srmmu.c:731:46: warning: Using plain integer as NULL pointer
srmmu.c:870:13: warning: symbol 'srmmu_paging_init' was not declared. Should it be static?
Add proper prototypes in mm_32.h and drop local prototype in init_32.c
Replace 0 with NULL
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/init_32.c | 3 | ||||
-rw-r--r-- | arch/sparc/mm/iommu.c | 5 | ||||
-rw-r--r-- | arch/sparc/mm/mm_32.h | 4 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 6 |
4 files changed, 11 insertions, 7 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index db6987082805..cf09e6e9e18d 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
36 | #include <asm/leon.h> | 36 | #include <asm/leon.h> |
37 | 37 | ||
38 | #include "mm_32.h" | ||
39 | |||
38 | unsigned long *sparc_valid_addr_bitmap; | 40 | unsigned long *sparc_valid_addr_bitmap; |
39 | EXPORT_SYMBOL(sparc_valid_addr_bitmap); | 41 | EXPORT_SYMBOL(sparc_valid_addr_bitmap); |
40 | 42 | ||
@@ -246,7 +248,6 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) | |||
246 | * init routine based upon the Sun model type on the Sparc. | 248 | * init routine based upon the Sun model type on the Sparc. |
247 | * | 249 | * |
248 | */ | 250 | */ |
249 | extern void srmmu_paging_init(void); | ||
250 | extern void device_scan(void); | 251 | extern void device_scan(void); |
251 | 252 | ||
252 | void __init paging_init(void) | 253 | void __init paging_init(void) |
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 28f96f27c768..35384cb60b21 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/iommu.h> | 27 | #include <asm/iommu.h> |
28 | #include <asm/dma.h> | 28 | #include <asm/dma.h> |
29 | 29 | ||
30 | #include "mm_32.h" | ||
31 | |||
30 | /* | 32 | /* |
31 | * This can be sized dynamically, but we will do this | 33 | * This can be sized dynamically, but we will do this |
32 | * only when we have a guidance about actual I/O pressures. | 34 | * only when we have a guidance about actual I/O pressures. |
@@ -37,9 +39,6 @@ | |||
37 | #define IOMMU_NPTES (IOMMU_WINSIZE/PAGE_SIZE) /* 64K PTEs, 256KB */ | 39 | #define IOMMU_NPTES (IOMMU_WINSIZE/PAGE_SIZE) /* 64K PTEs, 256KB */ |
38 | #define IOMMU_ORDER 6 /* 4096 * (1<<6) */ | 40 | #define IOMMU_ORDER 6 /* 4096 * (1<<6) */ |
39 | 41 | ||
40 | /* srmmu.c */ | ||
41 | extern int viking_mxcc_present; | ||
42 | extern int flush_page_for_dma_global; | ||
43 | static int viking_flush; | 42 | static int viking_flush; |
44 | /* viking.S */ | 43 | /* viking.S */ |
45 | extern void viking_flush_page(unsigned long page); | 44 | extern void viking_flush_page(unsigned long page); |
diff --git a/arch/sparc/mm/mm_32.h b/arch/sparc/mm/mm_32.h index ee773e4cf057..443e62e7c76a 100644 --- a/arch/sparc/mm/mm_32.h +++ b/arch/sparc/mm/mm_32.h | |||
@@ -10,5 +10,9 @@ void window_ret_fault(struct pt_regs *regs); | |||
10 | 10 | ||
11 | /* srmmu.c */ | 11 | /* srmmu.c */ |
12 | extern char *srmmu_name; | 12 | extern char *srmmu_name; |
13 | extern int viking_mxcc_present; | ||
14 | extern int flush_page_for_dma_global; | ||
13 | 15 | ||
14 | extern void (*poke_srmmu)(void); | 16 | extern void (*poke_srmmu)(void); |
17 | |||
18 | void __init srmmu_paging_init(void); | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 54e834cb6c7b..4639d8e9c48b 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -100,7 +100,6 @@ static unsigned long srmmu_nocache_end; | |||
100 | #define SRMMU_NOCACHE_ALIGN_MAX (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS) | 100 | #define SRMMU_NOCACHE_ALIGN_MAX (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS) |
101 | 101 | ||
102 | void *srmmu_nocache_pool; | 102 | void *srmmu_nocache_pool; |
103 | void *srmmu_nocache_bitmap; | ||
104 | static struct bit_map srmmu_nocache_map; | 103 | static struct bit_map srmmu_nocache_map; |
105 | 104 | ||
106 | static inline int srmmu_pmd_none(pmd_t pmd) | 105 | static inline int srmmu_pmd_none(pmd_t pmd) |
@@ -173,7 +172,7 @@ static void *__srmmu_get_nocache(int size, int align) | |||
173 | printk(KERN_ERR "srmmu: out of nocache %d: %d/%d\n", | 172 | printk(KERN_ERR "srmmu: out of nocache %d: %d/%d\n", |
174 | size, (int) srmmu_nocache_size, | 173 | size, (int) srmmu_nocache_size, |
175 | srmmu_nocache_map.used << SRMMU_NOCACHE_BITMAP_SHIFT); | 174 | srmmu_nocache_map.used << SRMMU_NOCACHE_BITMAP_SHIFT); |
176 | return 0; | 175 | return NULL; |
177 | } | 176 | } |
178 | 177 | ||
179 | addr = SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT); | 178 | addr = SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT); |
@@ -269,6 +268,7 @@ static void __init srmmu_nocache_calcsize(void) | |||
269 | 268 | ||
270 | static void __init srmmu_nocache_init(void) | 269 | static void __init srmmu_nocache_init(void) |
271 | { | 270 | { |
271 | void *srmmu_nocache_bitmap; | ||
272 | unsigned int bitmap_bits; | 272 | unsigned int bitmap_bits; |
273 | pgd_t *pgd; | 273 | pgd_t *pgd; |
274 | pmd_t *pmd; | 274 | pmd_t *pmd; |
@@ -728,7 +728,7 @@ static inline unsigned long srmmu_probe(unsigned long vaddr) | |||
728 | "=r" (retval) : | 728 | "=r" (retval) : |
729 | "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE)); | 729 | "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE)); |
730 | } else { | 730 | } else { |
731 | retval = leon_swprobe(vaddr, 0); | 731 | retval = leon_swprobe(vaddr, NULL); |
732 | } | 732 | } |
733 | return retval; | 733 | return retval; |
734 | } | 734 | } |