Commit 342ff7b24f42d01b27d884c699855c713d720fcb
Committed by
David S. Miller
1 parent
9457106575
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 0 additions and 27 deletions Side-by-side Diff
drivers/dma/iovlock.c
... | ... | @@ -143,30 +143,7 @@ |
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 | 146 | |
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 | - | |
170 | 147 | /* |
171 | 148 | * We have already pinned down the pages we will be using in the iovecs. |
172 | 149 | * Each entry in iov array has corresponding entry in pinned_list->page_list. |
... | ... | @@ -186,10 +163,6 @@ |
186 | 163 | |
187 | 164 | if (!chan) |
188 | 165 | return memcpy_toiovec(iov, kdata, len); |
189 | - | |
190 | - /* -> kernel copies (e.g. smbfs) */ | |
191 | - if (!pinned_list) | |
192 | - return dma_memcpy_to_kernel_iovec(chan, iov, kdata, len); | |
193 | 166 | |
194 | 167 | iovec_idx = 0; |
195 | 168 | while (iovec_idx < pinned_list->nr_iovecs) { |