Skip to content

Commit d7bce85

Browse files
committed
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 <[email protected]> Fixes: 9e3bb9b ("virtio_pci_modern: introduce helper to map vq notify area") Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 0f8a0b0 commit d7bce85

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

drivers/virtio/virtio_pci_modern_dev.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ static u16 vp_modern_get_queue_notify_off(struct virtio_pci_modern_device *mdev,
605605
*
606606
* Returns the address of the notification area
607607
*/
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)
610610
{
611611
u16 off = vp_modern_get_queue_notify_off(mdev, index);
612612

@@ -624,10 +624,9 @@ void *vp_modern_map_vq_notify(struct virtio_pci_modern_device *mdev,
624624
if (pa)
625625
*pa = mdev->notify_pa +
626626
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;
629628
} else {
630-
return (void __force *)vp_modern_map_capability(mdev,
629+
return vp_modern_map_capability(mdev,
631630
mdev->notify_map_cap, 2, 2,
632631
off * mdev->notify_offset_multiplier, 2,
633632
NULL, pa);

include/linux/virtio_pci_modern.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ void vp_modern_set_queue_size(struct virtio_pci_modern_device *mdev,
101101
u16 vp_modern_get_queue_size(struct virtio_pci_modern_device *mdev,
102102
u16 idx);
103103
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);
106106
int vp_modern_probe(struct virtio_pci_modern_device *mdev);
107107
void vp_modern_remove(struct virtio_pci_modern_device *mdev);
108108
#endif

0 commit comments

Comments
 (0)