summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vboxvideo
diff options
context:
space:
mode:
authorAlexander Kapshuk <alexander.kapshuk@gmail.com>2017-12-25 16:42:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-08 16:03:45 +0100
commit21c0885fd1f67845c59ee37989925e99fcc9018f (patch)
treea18349981043fd6409d0912e68c76ac8fe962b7d /drivers/staging/vboxvideo
parentc3738b37d899e32592b08e92edbb4842e2697c9d (diff)
downloadtalos-obmc-linux-21c0885fd1f67845c59ee37989925e99fcc9018f.tar.gz
talos-obmc-linux-21c0885fd1f67845c59ee37989925e99fcc9018f.zip
vboxvideo: Fix incorrect type in assignment sparse warning
Sparse emitted the following warning: ../drivers/staging/vboxvideo/vbox_fb.c:173:27: warning: incorrect type in assignment (different address spaces) ../drivers/staging/vboxvideo/vbox_fb.c:173:27: expected char [noderef] <asn:2>*screen_base ../drivers/staging/vboxvideo/vbox_fb.c:173:27: got void *virtual The vbox_bo buffer object kernel mapping is handled by a call to ttm_bo_kmap() prior to the assignment of bo->kmap.virtual to info->screen_base of type char __iomem*. Casting bo->kmap.virtual to char __iomem* in this assignment fixes the warning. vboxvideo: Fix address space of expression removal sparse warning Sparse emitted the following warning: ../drivers/staging/vboxvideo/vbox_main.c:64:25: warning: cast removes address space of expression vbox->vbva_buffers iomapping is handled by calling vbox_accel_init() from vbox_hw_init(). __force attribute is used in assignment to vbva to fix the warning. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vboxvideo')
-rw-r--r--drivers/staging/vboxvideo/vbox_fb.c2
-rw-r--r--drivers/staging/vboxvideo/vbox_main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
index 8aed248db6e2..43c39eca4ae1 100644
--- a/drivers/staging/vboxvideo/vbox_fb.c
+++ b/drivers/staging/vboxvideo/vbox_fb.c
@@ -170,7 +170,7 @@ static int vboxfb_create(struct drm_fb_helper *helper,
drm_fb_helper_fill_var(info, &fbdev->helper, sizes->fb_width,
sizes->fb_height);
- info->screen_base = bo->kmap.virtual;
+ info->screen_base = (char __iomem *)bo->kmap.virtual;
info->screen_size = size;
#ifdef CONFIG_DRM_KMS_FB_HELPER
diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
index 80bd039fa08e..973b3bcc04b1 100644
--- a/drivers/staging/vboxvideo/vbox_main.c
+++ b/drivers/staging/vboxvideo/vbox_main.c
@@ -61,7 +61,7 @@ void vbox_enable_accel(struct vbox_private *vbox)
if (vbox->vbva_info[i].vbva)
continue;
- vbva = (void *)vbox->vbva_buffers + i * VBVA_MIN_BUFFER_SIZE;
+ vbva = (void __force *)vbox->vbva_buffers + i * VBVA_MIN_BUFFER_SIZE;
if (!vbva_enable(&vbox->vbva_info[i],
vbox->guest_pool, vbva, i)) {
/* very old host or driver error. */
OpenPOWER on IntegriCloud