[dpdk-dev] [PATCH v7 1/7] vhost: remove useless volatile

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Oct 14 11:34:32 CEST 2016


From: Zhihong Wang <zhihong.wang at intel.com>

last_used_idx is a local var, there is no need to decorate it
by "volatile".

Signed-off-by: Zhihong Wang <zhihong.wang at intel.com>
---
 lib/librte_vhost/vhost.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 53dbf33..17c557f 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -85,7 +85,7 @@ struct vhost_virtqueue {
 	uint32_t		size;
 
 	uint16_t		last_avail_idx;
-	volatile uint16_t	last_used_idx;
+	uint16_t		last_used_idx;
 #define VIRTIO_INVALID_EVENTFD		(-1)
 #define VIRTIO_UNINITIALIZED_EVENTFD	(-2)
 
-- 
1.9.0



More information about the dev mailing list