netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shannon Nelson <shannon.nelson@intel.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: viro@ftp.linux.org.uk, christopher.leech@intel.com,
	andy.grover@gmail.com, shannon.nelson@intel.com
Subject: [PATCH] NET_DMA: remove unused dma_memcpy_to_kernel_iovec
Date: Tue, 24 Jul 2007 13:45:44 -0700	[thread overview]
Message-ID: <20070724204544.10360.61370.stgit@localhost.localdomain> (raw)

Al Viro pointed out that dma_memcpy_to_kernel_iovec() really was
unreachable and thus unused.  The code originally was there to support
in-kernel dma needs, but since it remains unused, we'll pull it out.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
---

 drivers/dma/iovlock.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c
index d637555..e763d72 100644
--- a/drivers/dma/iovlock.c
+++ b/drivers/dma/iovlock.c
@@ -143,29 +143,6 @@ void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list)
 	kfree(pinned_list);
 }
 
-static dma_cookie_t dma_memcpy_to_kernel_iovec(struct dma_chan *chan, struct
-	iovec *iov, unsigned char *kdata, size_t len)
-{
-	dma_cookie_t dma_cookie = 0;
-
-	while (len > 0) {
-		if (iov->iov_len) {
-			int copy = min_t(unsigned int, iov->iov_len, len);
-			dma_cookie = dma_async_memcpy_buf_to_buf(
-					chan,
-					iov->iov_base,
-					kdata,
-					copy);
-			kdata += copy;
-			len -= copy;
-			iov->iov_len -= copy;
-			iov->iov_base += copy;
-		}
-		iov++;
-	}
-
-	return dma_cookie;
-}
 
 /*
  * We have already pinned down the pages we will be using in the iovecs.
@@ -187,10 +164,6 @@ dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov,
 	if (!chan)
 		return memcpy_toiovec(iov, kdata, len);
 
-	/* -> kernel copies (e.g. smbfs) */
-	if (!pinned_list)
-		return dma_memcpy_to_kernel_iovec(chan, iov, kdata, len);
-
 	iovec_idx = 0;
 	while (iovec_idx < pinned_list->nr_iovecs) {
 		struct dma_page_list *page_list;

             reply	other threads:[~2007-07-24 20:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 20:45 Shannon Nelson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-07-25  0:36 [PATCH] NET_DMA: remove unused dma_memcpy_to_kernel_iovec Shannon Nelson
2007-07-25  0:37 ` David Miller
2007-07-26  7:06 ` David Miller
2007-07-30 14:39   ` pravin
2007-07-30 18:14     ` Christoph Hellwig
2007-07-30 20:47     ` Waskiewicz Jr, Peter P

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=20070724204544.10360.61370.stgit@localhost.localdomain \
    --to=shannon.nelson@intel.com \
    --cc=andy.grover@gmail.com \
    --cc=christopher.leech@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /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).