Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NET_DMA]: remove unused dma_memcpy_to_kernel_iovec

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>

authored by

Shannon Nelson and committed by
David S. Miller
342ff7b2 94571065

-27
-27
drivers/dma/iovlock.c
··· 143 143 kfree(pinned_list); 144 144 } 145 145 146 - static dma_cookie_t dma_memcpy_to_kernel_iovec(struct dma_chan *chan, struct 147 - iovec *iov, unsigned char *kdata, size_t len) 148 - { 149 - dma_cookie_t dma_cookie = 0; 150 - 151 - while (len > 0) { 152 - if (iov->iov_len) { 153 - int copy = min_t(unsigned int, iov->iov_len, len); 154 - dma_cookie = dma_async_memcpy_buf_to_buf( 155 - chan, 156 - iov->iov_base, 157 - kdata, 158 - copy); 159 - kdata += copy; 160 - len -= copy; 161 - iov->iov_len -= copy; 162 - iov->iov_base += copy; 163 - } 164 - iov++; 165 - } 166 - 167 - return dma_cookie; 168 - } 169 146 170 147 /* 171 148 * We have already pinned down the pages we will be using in the iovecs. ··· 163 186 164 187 if (!chan) 165 188 return memcpy_toiovec(iov, kdata, len); 166 - 167 - /* -> kernel copies (e.g. smbfs) */ 168 - if (!pinned_list) 169 - return dma_memcpy_to_kernel_iovec(chan, iov, kdata, len); 170 189 171 190 iovec_idx = 0; 172 191 while (iovec_idx < pinned_list->nr_iovecs) {