diff options
author | Shannon Nelson <shannon.nelson@intel.com> | 2007-07-26 03:05:53 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-31 05:28:03 -0400 |
commit | 342ff7b24f42d01b27d884c699855c713d720fcb (patch) | |
tree | 6b24a7d1ff21dbb864948e4b1a29a05b62c29fa1 | |
parent | 94571065757a4f2619c48ab4e36cafdc635028ce (diff) |
[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>
-rw-r--r-- | 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 d637555a833b..e763d723e4cf 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) | |||
143 | kfree(pinned_list); | 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 | * We have already pinned down the pages we will be using in the iovecs. | 148 | * 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, | |||
187 | if (!chan) | 164 | if (!chan) |
188 | return memcpy_toiovec(iov, kdata, len); | 165 | return memcpy_toiovec(iov, kdata, len); |
189 | 166 | ||
190 | /* -> kernel copies (e.g. smbfs) */ | ||
191 | if (!pinned_list) | ||
192 | return dma_memcpy_to_kernel_iovec(chan, iov, kdata, len); | ||
193 | |||
194 | iovec_idx = 0; | 167 | iovec_idx = 0; |
195 | while (iovec_idx < pinned_list->nr_iovecs) { | 168 | while (iovec_idx < pinned_list->nr_iovecs) { |
196 | struct dma_page_list *page_list; | 169 | struct dma_page_list *page_list; |