summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2021-05-04 10:12:10 +0200
committerMichael S. Tsirkin <mst@redhat.com>2021-05-04 10:19:58 +0200
commit0f8a0b0b095fd9b301523c0f78686f5ac6fda564 (patch)
treed9f44fc0f9864e6c42f6005b93bf33abbf964551 /drivers/virtio
parentvDPA/ifcvf: get_config_size should return dev specific config size (diff)
downloadlinux-0f8a0b0b095fd9b301523c0f78686f5ac6fda564.tar.xz
linux-0f8a0b0b095fd9b301523c0f78686f5ac6fda564.zip
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 <lkp@intel.com> Fixes: 7dca6c0ea96b ("virtio-pci library: switch to use vp_modern_map_vq_notify()") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_pci_modern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 722ea44e7579..30654d3a0b41 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -224,7 +224,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
virtqueue_get_avail_addr(vq),
virtqueue_get_used_addr(vq));
- vq->priv = vp_modern_map_vq_notify(mdev, index, NULL);
+ vq->priv = (void __force *)vp_modern_map_vq_notify(mdev, index, NULL);
if (!vq->priv) {
err = -ENOMEM;
goto err_map_notify;