summaryrefslogtreecommitdiff
path: root/drivers/misc/mic/host
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/host
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/host')
-rw-r--r--drivers/misc/mic/host/mic_virtio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c
index 453d740..e04bb4f 100644
--- a/drivers/misc/mic/host/mic_virtio.c
+++ b/drivers/misc/mic/host/mic_virtio.c
@@ -41,7 +41,7 @@ static int mic_virtio_copy_to_user(struct mic_vdev *mvdev,
* We are copying from IO below an should ideally use something
* like copy_to_user_fromio(..) if it existed.
*/
- if (copy_to_user(ubuf, dbuf, len)) {
+ if (copy_to_user(ubuf, (void __force *)dbuf, len)) {
err = -EFAULT;
dev_err(mic_dev(mvdev), "%s %d err %d\n",
__func__, __LINE__, err);
@@ -66,7 +66,7 @@ static int mic_virtio_copy_from_user(struct mic_vdev *mvdev,
* We are copying to IO below and should ideally use something
* like copy_from_user_toio(..) if it existed.
*/
- if (copy_from_user(dbuf, ubuf, len)) {
+ if (copy_from_user((void __force *)dbuf, ubuf, len)) {
err = -EFAULT;
dev_err(mic_dev(mvdev), "%s %d err %d\n",
__func__, __LINE__, err);
@@ -293,8 +293,8 @@ static void mic_virtio_init_post(struct mic_vdev *mvdev)
continue;
}
mvdev->mvr[i].vrh.vring.used =
- mvdev->mdev->aper.va
- + le64_to_cpu(vqconfig[i].used_address);
+ (void __force *)mvdev->mdev->aper.va +
+ le64_to_cpu(vqconfig[i].used_address);
}
mvdev->dc->used_address_updated = 0;