From c31f76518e3b3d755a24db43e556869cafce6d64 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 21 Apr 2014 21:39:27 +0200 Subject: 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 Signed-off-by: David S. Miller --- arch/sparc/kernel/ioport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/sparc/kernel/ioport.c') 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, if (name == NULL) name = "???"; - if ((xres = xres_alloc()) != 0) { + if ((xres = xres_alloc()) != NULL) { tack = xres->xname; res = &xres->xres; } else { @@ -400,7 +400,7 @@ static void sbus_sync_sg_for_device(struct device *dev, struct scatterlist *sg, BUG(); } -struct dma_map_ops sbus_dma_ops = { +static struct dma_map_ops sbus_dma_ops = { .alloc = sbus_alloc_coherent, .free = sbus_free_coherent, .map_page = sbus_map_page, @@ -681,7 +681,7 @@ static int sparc_io_proc_show(struct seq_file *m, void *v) const char *nm; for (r = root->child; r != NULL; r = r->sibling) { - if ((nm = r->name) == 0) nm = "???"; + if ((nm = r->name) == NULL) nm = "???"; seq_printf(m, "%016llx-%016llx: %s\n", (unsigned long long)r->start, (unsigned long long)r->end, nm); -- cgit v1.2.3