Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Marek Szyprowski and committed by
Inki Dae
c5f2f0c4 3b356785

+9 -6
+3 -2
drivers/gpu/drm/exynos/exynos_drm_g2d.c
··· 1151 1151 goto err_free_event; 1152 1152 } 1153 1153 1154 - cmd = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd; 1154 + cmd = (struct drm_exynos_g2d_cmd *)(unsigned long)req->cmd; 1155 1155 1156 1156 if (copy_from_user(cmdlist->data + cmdlist->last, 1157 1157 (void __user *)cmd, ··· 1169 1169 if (req->cmd_buf_nr) { 1170 1170 struct drm_exynos_g2d_cmd *cmd_buf; 1171 1171 1172 - cmd_buf = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd_buf; 1172 + cmd_buf = (struct drm_exynos_g2d_cmd *) 1173 + (unsigned long)req->cmd_buf; 1173 1174 1174 1175 if (copy_from_user(cmdlist->data + cmdlist->last, 1175 1176 (void __user *)cmd_buf,
+1 -1
drivers/gpu/drm/exynos/exynos_drm_gem.c
··· 218 218 return ERR_PTR(ret); 219 219 } 220 220 221 - DRM_DEBUG_KMS("created file object = 0x%x\n", (unsigned int)obj->filp); 221 + DRM_DEBUG_KMS("created file object = %p\n", obj->filp); 222 222 223 223 return exynos_gem; 224 224 }
+5 -3
drivers/gpu/drm/exynos/exynos_drm_vidi.c
··· 223 223 } 224 224 } 225 225 226 - static int vidi_show_connection(struct device *dev, 226 + static ssize_t vidi_show_connection(struct device *dev, 227 227 struct device_attribute *attr, char *buf) 228 228 { 229 229 struct vidi_context *ctx = dev_get_drvdata(dev); ··· 238 238 return rc; 239 239 } 240 240 241 - static int vidi_store_connection(struct device *dev, 241 + static ssize_t vidi_store_connection(struct device *dev, 242 242 struct device_attribute *attr, 243 243 const char *buf, size_t len) 244 244 { ··· 294 294 } 295 295 296 296 if (vidi->connection) { 297 - struct edid *raw_edid = (struct edid *)(uint32_t)vidi->edid; 297 + struct edid *raw_edid; 298 + 299 + raw_edid = (struct edid *)(unsigned long)vidi->edid; 298 300 if (!drm_edid_is_valid(raw_edid)) { 299 301 DRM_DEBUG_KMS("edid data is invalid.\n"); 300 302 return -EINVAL;