From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix warning in kernel/dma.c
Date: Mon, 17 Feb 2003 22:55:32 +0100 [thread overview]
Message-ID: <20030217215532.GA8984@mars.ravnborg.org> (raw)
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);
reply other threads:[~2003-02-17 21:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030217215532.GA8984@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®