]> err.no Git - linux-2.6/commitdiff
[NET_DMA]: remove unused dma_memcpy_to_kernel_iovec
authorShannon Nelson <shannon.nelson@intel.com>
Thu, 26 Jul 2007 07:05:53 +0000 (00:05 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 31 Jul 2007 09:28:03 +0000 (02:28 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/dma/iovlock.c

index d637555a833b78870f2f19da130d54d93e0d2f96..e763d723e4cfa6fe7889e4d07f1db948bed317ca 100644 (file)
@@ -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;