drm/omap: 64bit compile fixes
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 21 Feb 2017 07:57:12 +0000 (09:57 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Jun 2017 07:57:13 +0000 (10:57 +0300)
Fix a few type issues that cause compile warnings on 64 bit ARM
compiler. The change should not affect 32bit platforms.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
drivers/gpu/drm/omapdrm/omap_fb.c
drivers/gpu/drm/omapdrm/omap_gem.c

index 3cab066..1dd3daf 100644 (file)
@@ -388,7 +388,7 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, uint16_t w,
        u32 min_align = 128;
        int ret;
        unsigned long flags;
-       size_t slot_bytes;
+       u32 slot_bytes;
 
        BUG_ON(!validfmt(fmt));
 
index ee615fa..4bf9fcf 100644 (file)
@@ -450,7 +450,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
 
                if (size > omap_gem_mmap_size(bos[i]) - mode_cmd->offsets[i]) {
                        dev_dbg(dev->dev,
-                               "provided buffer object is too small! %d < %d\n",
+                               "provided buffer object is too small! %zu < %d\n",
                                bos[i]->size - mode_cmd->offsets[i], size);
                        ret = -EINVAL;
                        goto fail;
index 461fbb5..13abf22 100644 (file)
@@ -1048,7 +1048,7 @@ void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m)
                                        area->p1.x, area->p1.y);
                }
        } else {
-               seq_printf(m, " %d", obj->size);
+               seq_printf(m, " %zu", obj->size);
        }
 
        seq_printf(m, "\n");