Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s3cmci: fix sparse errors from non-exported functions

Fix the following sparse errors by making the functions
static and fixing the check for host->base.

598:6: warning: symbol 's3cmci_dma_done_callback' was not declared. Should it be static?
744:6: warning: symbol 's3cmci_dma_setup' was not declared. Should it be static?
1209:20: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>

authored by

Ben Dooks and committed by
Pierre Ossman
5d304400 b09c3e3f

+6 -5
+6 -5
drivers/mmc/host/s3cmci.c
··· 595 595 return IRQ_HANDLED; 596 596 } 597 597 598 - void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch, void *buf_id, 599 - int size, enum s3c2410_dma_buffresult result) 598 + static void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch, 599 + void *buf_id, int size, 600 + enum s3c2410_dma_buffresult result) 600 601 { 601 602 struct s3cmci_host *host = buf_id; 602 603 unsigned long iflags; ··· 741 740 mmc_request_done(host->mmc, mrq); 742 741 } 743 742 744 - 745 - void s3cmci_dma_setup(struct s3cmci_host *host, enum s3c2410_dmasrc source) 743 + static void s3cmci_dma_setup(struct s3cmci_host *host, 744 + enum s3c2410_dmasrc source) 746 745 { 747 746 static enum s3c2410_dmasrc last_source = -1; 748 747 static int setup_ok; ··· 1207 1206 } 1208 1207 1209 1208 host->base = ioremap(host->mem->start, RESSIZE(host->mem)); 1210 - if (host->base == 0) { 1209 + if (!host->base) { 1211 1210 dev_err(&pdev->dev, "failed to ioremap() io memory region.\n"); 1212 1211 ret = -EINVAL; 1213 1212 goto probe_free_mem_region;