aboutsummaryrefslogtreecommitdiffstats
path: root/tools/virtio/linux
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-01-12 00:14:42 -0500
committerRusty Russell <rusty@rustcorp.com.au>2012-01-12 00:14:42 -0500
commitf96fde41f7f9af6cf20f6a1919f5d9670f84d574 (patch)
tree14b8a0343b255989ac8ba0ea34e18dca419723df /tools/virtio/linux
parent5dfc17628d57f9e62043ed0cba03a6e3eb019a78 (diff)
virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
Remove wrapper functions. This makes the allocation type explicit in all callers; I used GPF_KERNEL where it seemed obvious, left it at GFP_ATOMIC otherwise. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tools/virtio/linux')
-rw-r--r--tools/virtio/linux/virtio.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h
index 953db2abf6b9..b4fbc91c41b4 100644
--- a/tools/virtio/linux/virtio.h
+++ b/tools/virtio/linux/virtio.h
@@ -186,21 +186,12 @@ struct virtqueue {
186#endif 186#endif
187 187
188/* Interfaces exported by virtio_ring. */ 188/* Interfaces exported by virtio_ring. */
189int virtqueue_add_buf_gfp(struct virtqueue *vq, 189int virtqueue_add_buf(struct virtqueue *vq,
190 struct scatterlist sg[], 190 struct scatterlist sg[],
191 unsigned int out_num, 191 unsigned int out_num,
192 unsigned int in_num, 192 unsigned int in_num,
193 void *data, 193 void *data,
194 gfp_t gfp); 194 gfp_t gfp);
195
196static inline int virtqueue_add_buf(struct virtqueue *vq,
197 struct scatterlist sg[],
198 unsigned int out_num,
199 unsigned int in_num,
200 void *data)
201{
202 return virtqueue_add_buf_gfp(vq, sg, out_num, in_num, data, GFP_ATOMIC);
203}
204 195
205void virtqueue_kick(struct virtqueue *vq); 196void virtqueue_kick(struct virtqueue *vq);
206 197