Skip to content

Commit 0f8a0b0

Browse files
committed
virtio_pci_modern: __force cast the notify mapping
When switching virtio_pci_modern to use a helper for mappings we lost an __iomem tag. We should restore it. However, virtio_pci_modern is playing tricks by hiding an iomem pointer in a regular vq->priv pointer. Which is okay as long as it's all contained within a single file, but we need to __force cast the value otherwise we'll get sparse warnings. Reported-by: kernel test robot <[email protected]> Fixes: 7dca6c0 ("virtio-pci library: switch to use vp_modern_map_vq_notify()") Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 5619003 commit 0f8a0b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/virtio/virtio_pci_modern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
224224
virtqueue_get_avail_addr(vq),
225225
virtqueue_get_used_addr(vq));
226226

227-
vq->priv = vp_modern_map_vq_notify(mdev, index, NULL);
227+
vq->priv = (void __force *)vp_modern_map_vq_notify(mdev, index, NULL);
228228
if (!vq->priv) {
229229
err = -ENOMEM;
230230
goto err_map_notify;

0 commit comments

Comments
 (0)