summaryrefslogtreecommitdiff
path: root/drivers/misc/mic/card/mic_virtio.c
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2013-11-27 16:58:43 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-27 19:08:30 (GMT)
commit1a9286236916bb397c0fa7e9b3a354c291c85beb (patch)
tree3e774ae1202e2a93521ce09f7af24e1ad7b15cd3 /drivers/misc/mic/card/mic_virtio.c
parent173c07278763850bfee57eec442dce38855d6f13 (diff)
downloadlinux-1a9286236916bb397c0fa7e9b3a354c291c85beb.tar.xz
misc: mic: Suppress memory space sparse warnings
MIC card and host drivers are able to use virtio over the PCIe bus by treating ioremap return values for the prefetchable BARs as pointers, effectively treating I/O memory the same as system memory. However this results in sparse warnings. Knowing that these warnings do not point to a functional issue, this patch suppresses these warnings. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic/card/mic_virtio.c')
-rw-r--r--drivers/misc/mic/card/mic_virtio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c
index ca0445f..653799b 100644
--- a/drivers/misc/mic/card/mic_virtio.c
+++ b/drivers/misc/mic/card/mic_virtio.c
@@ -256,8 +256,9 @@ static struct virtqueue *mic_find_vq(struct virtio_device *vdev,
mvdev->vr[index] = va;
memset_io(va, 0x0, _vr_size);
vq = vring_new_virtqueue(index, le16_to_cpu(config.num),
- MIC_VIRTIO_RING_ALIGN, vdev, false, va,
- mic_notify, callback, name);
+ MIC_VIRTIO_RING_ALIGN, vdev, false,
+ (void __force *)va, mic_notify, callback,
+ name);
if (!vq) {
err = -ENOMEM;
goto unmap;
@@ -540,7 +541,8 @@ static void mic_scan_devices(struct mic_driver *mdrv, bool remove)
continue;
/* device already exists */
- dev = device_find_child(mdrv->dev, d, mic_match_desc);
+ dev = device_find_child(mdrv->dev, (void __force *)d,
+ mic_match_desc);
if (dev) {
if (remove)
iowrite8(MIC_VIRTIO_PARAM_DEV_REMOVE,