summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-01-22 16:42:57 +0100
committerRusty Russell <rusty@rustcorp.com.au>2009-03-30 21:55:22 +1030
commit3a35ce7dcefe9e80a00603a195269fbaf6e7d901 (patch)
tree23d814e318c36d7a9fe601be2f535da45bceec56 /drivers/virtio
parent0d34fb8e93ceba7b6dad0062dbb4a0813bacd75b (diff)
downloadlinux-3.10-3a35ce7dcefe9e80a00603a195269fbaf6e7d901.tar.gz
linux-3.10-3a35ce7dcefe9e80a00603a195269fbaf6e7d901.tar.bz2
linux-3.10-3a35ce7dcefe9e80a00603a195269fbaf6e7d901.zip
virtio: fix BAD_RING, START_US and END_USE macros
Impact: cleanup fix BAD_RING, START_US and END_USE macros When these macros aren't called with a variable named vq as first argument, this would result in a build failure. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_ring.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 5777196bf6c..12273bf9b3b 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -23,15 +23,15 @@
#ifdef DEBUG
/* For development, we want to crash whenever the ring is screwed. */
-#define BAD_RING(vq, fmt...) \
- do { dev_err(&vq->vq.vdev->dev, fmt); BUG(); } while(0)
-#define START_USE(vq) \
- do { if ((vq)->in_use) panic("in_use = %i\n", (vq)->in_use); (vq)->in_use = __LINE__; mb(); } while(0)
-#define END_USE(vq) \
- do { BUG_ON(!(vq)->in_use); (vq)->in_use = 0; mb(); } while(0)
+#define BAD_RING(_vq, fmt...) \
+ do { dev_err(&_vq->vq.vdev->dev, fmt); BUG(); } while(0)
+#define START_USE(_vq) \
+ do { if ((_vq)->in_use) panic("in_use = %i\n", (_vq)->in_use); (_vq)->in_use = __LINE__; mb(); } while(0)
+#define END_USE(_vq) \
+ do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; mb(); } while(0)
#else
-#define BAD_RING(vq, fmt...) \
- do { dev_err(&vq->vq.vdev->dev, fmt); (vq)->broken = true; } while(0)
+#define BAD_RING(_vq, fmt...) \
+ do { dev_err(&_vq->vq.vdev->dev, fmt); (_vq)->broken = true; } while(0)
#define START_USE(vq)
#define END_USE(vq)
#endif