diff --git a/drivers/virtio/virtio-mmio.c b/drivers/virtio/virtio-mmio.c index 8788885e0d..049eff9816 100644 --- a/drivers/virtio/virtio-mmio.c +++ b/drivers/virtio/virtio-mmio.c @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -342,15 +343,15 @@ static int virtio_mmio_config_virtqueue(FAR struct metal_io_region *io, { metal_io_write32(io, VIRTIO_MMIO_QUEUE_NUM, vq->vq_nentries); - addr = (uint64_t)(uintptr_t)vq->vq_ring.desc; + addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.desc); metal_io_write32(io, VIRTIO_MMIO_QUEUE_DESC_LOW, addr); metal_io_write32(io, VIRTIO_MMIO_QUEUE_DESC_HIGH, addr >> 32); - addr = (uint64_t)(uintptr_t)vq->vq_ring.avail; + addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.avail); metal_io_write32(io, VIRTIO_MMIO_QUEUE_AVAIL_LOW, addr); metal_io_write32(io, VIRTIO_MMIO_QUEUE_AVAIL_HIGH, addr >> 32); - addr = (uint64_t)(uintptr_t)vq->vq_ring.used; + addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.used); metal_io_write32(io, VIRTIO_MMIO_QUEUE_USED_LOW, addr); metal_io_write32(io, VIRTIO_MMIO_QUEUE_USED_HIGH, addr >> 32); @@ -823,7 +824,7 @@ static int virtio_mmio_init_device(FAR struct virtio_mmio_device_s *vmdev, vdev->id.version = metal_io_read32(&vmdev->cfg_io, VIRTIO_MMIO_VERSION); if (vdev->id.version < 1 || vdev->id.version > 2) { - vrterr("Version %d not supported!\n", vdev->id.version); + vrterr("Version %"PRIu32" not supported!\n", vdev->id.version); return -ENODEV; }