lkml.org 
[lkml]   [2003]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix warning in kernel/dma.c
When compiling without PROC_FS enabled a warning is issued about
proc_dma_show defined but not used.
Move both versions of proc_dma_show inside the #ifdef CONFIG_PROC_FS

Sam


===== kernel/dma.c 1.5 vs edited =====
--- 1.5/kernel/dma.c Wed Aug 28 09:53:26 2002
+++ edited/kernel/dma.c Mon Feb 17 22:30:17 2003
@@ -98,6 +98,22 @@

} /* free_dma */

+#else
+
+int request_dma(unsigned int dmanr, const char *device_id)
+{
+ return -EINVAL;
+}
+
+void free_dma(unsigned int dmanr)
+{
+}
+
+#endif
+
+#ifdef CONFIG_PROC_FS
+
+#ifdef MAX_DMA_CHANNELS
static int proc_dma_show(struct seq_file *m, void *v)
{
int i;
@@ -110,27 +126,14 @@
}
return 0;
}
-
#else
-
-int request_dma(unsigned int dmanr, const char *device_id)
-{
- return -EINVAL;
-}
-
-void free_dma(unsigned int dmanr)
-{
-}
-
static int proc_dma_show(struct seq_file *m, void *v)
{
seq_puts(m, "No DMA\n");
return 0;
}
+#endif /* MAX_DMA_CHANNELS */

-#endif
-
-#ifdef CONFIG_PROC_FS
static int proc_dma_open(struct inode *inode, struct file *file)
{
char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:1.372 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site