Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio_pci_modern: correct sparse tags for notify

When switching virtio_pci_modern to use a helper for mappings we lost an
__iomem tag. Restore it.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 9e3bb9b79a71 ("virtio_pci_modern: introduce helper to map vq notify area")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

+6 -7
+4 -5
drivers/virtio/virtio_pci_modern_dev.c
··· 605 605 * 606 606 * Returns the address of the notification area 607 607 */ 608 - void *vp_modern_map_vq_notify(struct virtio_pci_modern_device *mdev, 609 - u16 index, resource_size_t *pa) 608 + void __iomem *vp_modern_map_vq_notify(struct virtio_pci_modern_device *mdev, 609 + u16 index, resource_size_t *pa) 610 610 { 611 611 u16 off = vp_modern_get_queue_notify_off(mdev, index); 612 612 ··· 624 624 if (pa) 625 625 *pa = mdev->notify_pa + 626 626 off * mdev->notify_offset_multiplier; 627 - return (void __force *)mdev->notify_base + 628 - off * mdev->notify_offset_multiplier; 627 + return mdev->notify_base + off * mdev->notify_offset_multiplier; 629 628 } else { 630 - return (void __force *)vp_modern_map_capability(mdev, 629 + return vp_modern_map_capability(mdev, 631 630 mdev->notify_map_cap, 2, 2, 632 631 off * mdev->notify_offset_multiplier, 2, 633 632 NULL, pa);
+2 -2
include/linux/virtio_pci_modern.h
··· 101 101 u16 vp_modern_get_queue_size(struct virtio_pci_modern_device *mdev, 102 102 u16 idx); 103 103 u16 vp_modern_get_num_queues(struct virtio_pci_modern_device *mdev); 104 - void *vp_modern_map_vq_notify(struct virtio_pci_modern_device *mdev, 105 - u16 index, resource_size_t *pa); 104 + void __iomem * vp_modern_map_vq_notify(struct virtio_pci_modern_device *mdev, 105 + u16 index, resource_size_t *pa); 106 106 int vp_modern_probe(struct virtio_pci_modern_device *mdev); 107 107 void vp_modern_remove(struct virtio_pci_modern_device *mdev); 108 108 #endif