netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Chris Leech <christopher.leech@intel.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [2.6 patch] net/core/user_dma.c should #include <net/netdma.h>
Date: Sat, 15 Jul 2006 02:36:17 +0200	[thread overview]
Message-ID: <20060715003617.GL3633@stusta.de> (raw)

Every file should #include the headers containing the prototypes for 
its global functions.

Especially in cases like this one where gcc can tell us through a 
compile error that the prototype was wrong...

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 include/net/netdma.h |    2 +-
 net/core/user_dma.c  |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.18-rc1-mm2-full/include/net/netdma.h.old	2006-07-15 00:52:38.000000000 +0200
+++ linux-2.6.18-rc1-mm2-full/include/net/netdma.h	2006-07-15 00:52:43.000000000 +0200
@@ -37,7 +37,7 @@
 }
 
 int dma_skb_copy_datagram_iovec(struct dma_chan* chan,
-		const struct sk_buff *skb, int offset, struct iovec *to,
+		struct sk_buff *skb, int offset, struct iovec *to,
 		size_t len, struct dma_pinned_list *pinned_list);
 
 #endif /* CONFIG_NET_DMA */
--- linux-2.6.18-rc1-mm2-full/net/core/user_dma.c.old	2006-07-14 21:59:37.000000000 +0200
+++ linux-2.6.18-rc1-mm2-full/net/core/user_dma.c	2006-07-14 21:59:50.000000000 +0200
@@ -29,6 +29,7 @@
 #include <linux/socket.h>
 #include <linux/rtnetlink.h> /* for BUG_TRAP */
 #include <net/tcp.h>
+#include <net/netdma.h>
 
 #define NET_DMA_DEFAULT_COPYBREAK 4096
 


             reply	other threads:[~2006-07-15  0:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-15  0:36 Adrian Bunk [this message]
2006-07-18 20:30 ` [2.6 patch] net/core/user_dma.c should #include <net/netdma.h> David Miller

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=20060715003617.GL3633@stusta.de \
    --to=bunk@stusta.de \
    --cc=christopher.leech@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).