drm/exynos: fix types for compilation on 64bit architectures
This patch fixes compilation warnings (on 64bit architectures) and bugs related to casting pointers through 32bit integers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
Родитель
3b35678538
Коммит
c5f2f0c41e
|
@ -1151,7 +1151,7 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
|
|||
goto err_free_event;
|
||||
}
|
||||
|
||||
cmd = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd;
|
||||
cmd = (struct drm_exynos_g2d_cmd *)(unsigned long)req->cmd;
|
||||
|
||||
if (copy_from_user(cmdlist->data + cmdlist->last,
|
||||
(void __user *)cmd,
|
||||
|
@ -1169,7 +1169,8 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
|
|||
if (req->cmd_buf_nr) {
|
||||
struct drm_exynos_g2d_cmd *cmd_buf;
|
||||
|
||||
cmd_buf = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd_buf;
|
||||
cmd_buf = (struct drm_exynos_g2d_cmd *)
|
||||
(unsigned long)req->cmd_buf;
|
||||
|
||||
if (copy_from_user(cmdlist->data + cmdlist->last,
|
||||
(void __user *)cmd_buf,
|
||||
|
|
|
@ -218,7 +218,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev,
|
|||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("created file object = 0x%x\n", (unsigned int)obj->filp);
|
||||
DRM_DEBUG_KMS("created file object = %p\n", obj->filp);
|
||||
|
||||
return exynos_gem;
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ static void vidi_fake_vblank_handler(struct work_struct *work)
|
|||
}
|
||||
}
|
||||
|
||||
static int vidi_show_connection(struct device *dev,
|
||||
static ssize_t vidi_show_connection(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct vidi_context *ctx = dev_get_drvdata(dev);
|
||||
|
@ -238,7 +238,7 @@ static int vidi_show_connection(struct device *dev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int vidi_store_connection(struct device *dev,
|
||||
static ssize_t vidi_store_connection(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
|
@ -294,7 +294,9 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,
|
|||
}
|
||||
|
||||
if (vidi->connection) {
|
||||
struct edid *raw_edid = (struct edid *)(uint32_t)vidi->edid;
|
||||
struct edid *raw_edid;
|
||||
|
||||
raw_edid = (struct edid *)(unsigned long)vidi->edid;
|
||||
if (!drm_edid_is_valid(raw_edid)) {
|
||||
DRM_DEBUG_KMS("edid data is invalid.\n");
|
||||
return -EINVAL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче