From patchwork Wed Feb 3 12:42:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 61077 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp267521lbl; Wed, 3 Feb 2016 04:43:37 -0800 (PST) X-Received: by 10.98.67.135 with SMTP id l7mr1817508pfi.148.1454503402634; Wed, 03 Feb 2016 04:43:22 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id h9si9157713pat.144.2016.02.03.04.43.22; Wed, 03 Feb 2016 04:43:22 -0800 (PST) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 945F96E3D9; Wed, 3 Feb 2016 04:43:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id B92B16E3D9 for ; Wed, 3 Feb 2016 04:43:15 -0800 (PST) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1Z006CV2002D90@mailout4.w1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 03 Feb 2016 12:43:12 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-ac-56b1f5df46d7 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id CA.FC.16778.FD5F1B65; Wed, 3 Feb 2016 12:43:12 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O1Z00B561ZTMTA0@eusync3.samsung.com>; Wed, 03 Feb 2016 12:43:11 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 03/10] drm/exynos: fix types for compilation on 64bit architectures Date: Wed, 03 Feb 2016 13:42:47 +0100 Message-id: <1454503374-16382-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1454503374-16382-1-git-send-email-m.szyprowski@samsung.com> References: <1454503374-16382-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprILMWRmVeSWpSXmKPExsVy+t/xq7oPvm4MM/hqbHFr3TlWi40z1rNa XPn6ns1i0v0JLBYv7l1ksXj9wtBixvl9TBZrj9xlt5gx+SWbA6fH/e7jTB59W1YxenzeJBfA HMVlk5Kak1mWWqRvl8CVMWPBcdaCfomKc12P2BoYN4l0MXJySAiYSCyfdYURwhaTuHBvPVsX IxeHkMBSRolD3xtZIJwmJollJzawgVSxCRhKdL3tArNFBNwkmg7PZAUpYhbYwiTRvmsjE0hC WCBU4vapn0A2BweLgKrE0yfuIGFeAQ+Jtv272SG2yUn8f7kCrJxTwFNiT0cnC0i5EFDNnFv+ Exh5FzAyrGIUTS1NLihOSs811CtOzC0uzUvXS87P3cQICagvOxgXH7M6xCjAwajEw8vwY0OY EGtiWXFl7iFGCQ5mJRFeo88bw4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzzt31PkRIID2xJDU7 NbUgtQgmy8TBKdXAqDfNOPeWwJWLq95e+3xP6tGyR0EMq4Vc6i5L8K5hz6074v3+1YSTRkmO D0MnpEqqbqywWzHjUXG71Nc9soYvmw1myTNo+BoJluR7n3YJZGJ9NjnE+6+dWV+O5qHYyxy7 H82VE9/Wcdgp4aBW9tejto6xfQuXqXcoHet8+uN93hLLCuvlxgsOKbEUZyQaajEXFScCAPj/ kDUkAgAA Cc: Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Seung-Woo Kim , Andrzej Hajda , Marek Szyprowski X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch fixes compilation warnings (on 64bit architectures) and bugs related to casting pointers through 32bit integers. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 5 +++-- drivers/gpu/drm/exynos/exynos_drm_gem.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 +++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index c17efdb..8dfe6e1 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -1166,7 +1166,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, @@ -1184,7 +1184,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, diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index 32358c5..47d126a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -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; } diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 62ac4e5..b605bd7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -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;