aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2014-04-21 15:39:27 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-29 01:12:25 -0400
commitc31f76518e3b3d755a24db43e556869cafce6d64 (patch)
tree84c809fd5539306328c4b1f30399cd8c43c3cdbb /arch/sparc
parent529b17a9d3346b6e9063681e71748261342accbc (diff)
sparc32: fix sparse warnings in ioport.c
Fix following warnings: ioport.c:189:38: warning: Using plain integer as NULL pointer ioport.c:78:25: warning: symbol 'sparc_iomap' was not declared. Should it be static? ioport.c:403:20: warning: symbol 'sbus_dma_ops' was not declared. Should it be static? ioport.c:684:39: warning: Using plain integer as NULL pointer Add one missing prototype, and use NULL. sbus_dma_ops declared static. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h2
-rw-r--r--arch/sparc/kernel/ioport.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index 9b1c36de0f18..a3890da94428 100644
--- a/arch/sparc/include/asm/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
@@ -14,6 +14,8 @@ struct page;
14void *srmmu_get_nocache(int size, int align); 14void *srmmu_get_nocache(int size, int align);
15void srmmu_free_nocache(void *addr, int size); 15void srmmu_free_nocache(void *addr, int size);
16 16
17extern struct resource sparc_iomap;
18
17#define check_pgt_cache() do { } while (0) 19#define check_pgt_cache() do { } while (0)
18 20
19pgd_t *get_pgd_fast(void); 21pgd_t *get_pgd_fast(void);
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index e7e215dfa866..7f08ec8a7c68 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -186,7 +186,7 @@ static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
186 186
187 if (name == NULL) name = "???"; 187 if (name == NULL) name = "???";
188 188
189 if ((xres = xres_alloc()) != 0) { 189 if ((xres = xres_alloc()) != NULL) {
190 tack = xres->xname; 190 tack = xres->xname;
191 res = &xres->xres; 191 res = &xres->xres;
192 } else { 192 } else {
@@ -400,7 +400,7 @@ static void sbus_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
400 BUG(); 400 BUG();
401} 401}
402 402
403struct dma_map_ops sbus_dma_ops = { 403static struct dma_map_ops sbus_dma_ops = {
404 .alloc = sbus_alloc_coherent, 404 .alloc = sbus_alloc_coherent,
405 .free = sbus_free_coherent, 405 .free = sbus_free_coherent,
406 .map_page = sbus_map_page, 406 .map_page = sbus_map_page,
@@ -681,7 +681,7 @@ static int sparc_io_proc_show(struct seq_file *m, void *v)
681 const char *nm; 681 const char *nm;
682 682
683 for (r = root->child; r != NULL; r = r->sibling) { 683 for (r = root->child; r != NULL; r = r->sibling) {
684 if ((nm = r->name) == 0) nm = "???"; 684 if ((nm = r->name) == NULL) nm = "???";
685 seq_printf(m, "%016llx-%016llx: %s\n", 685 seq_printf(m, "%016llx-%016llx: %s\n",
686 (unsigned long long)r->start, 686 (unsigned long long)r->start,
687 (unsigned long long)r->end, nm); 687 (unsigned long long)r->end, nm);