virtio: fix compile error

CC:  virtio/virtio-mmio.c virtio/virtio-mmio.c: In function 'virtio_mmio_config_virtqueue':
virtio/virtio-mmio.c:346:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  346 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.desc);
      |              ^
virtio/virtio-mmio.c:350:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  350 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.avail);
      |              ^
virtio/virtio-mmio.c:354:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  354 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.used)

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-12-06 12:16:48 +08:00 committed by Xiang Xiao
parent 0481533833
commit 6e3f8d0356

View file

@ -343,15 +343,18 @@ 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)kasan_reset_tag((FAR void *)vq->vq_ring.desc);
addr = (uint64_t)((uintptr_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)kasan_reset_tag((FAR void *)vq->vq_ring.avail);
addr = (uint64_t)((uintptr_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)kasan_reset_tag((FAR void *)vq->vq_ring.used);
addr = (uint64_t)((uintptr_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);