The pointer to event structure should be cast to uintptr_t first.

Fixes: f803734b0f2e ("net/virtio: vring init for packed queues")
Cc: sta...@dpdk.org

Signed-off-by: Tiwei Bie <tiwei....@intel.com>
---
 drivers/net/virtio/virtio_ring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_ring.h b/drivers/net/virtio/virtio_ring.h
index 1760823c6..5a37629fe 100644
--- a/drivers/net/virtio/virtio_ring.h
+++ b/drivers/net/virtio/virtio_ring.h
@@ -165,7 +165,7 @@ vring_init_packed(struct vring_packed *vr, uint8_t *p, 
unsigned long align,
        vr->driver_event = (struct vring_packed_desc_event *)(p +
                        vr->num * sizeof(struct vring_packed_desc));
        vr->device_event = (struct vring_packed_desc_event *)
-               RTE_ALIGN_CEIL((uintptr_t)(vr->driver_event +
+               RTE_ALIGN_CEIL(((uintptr_t)vr->driver_event +
                                sizeof(struct vring_packed_desc_event)), align);
 }
 
-- 
2.17.1

Reply via email to