From patchwork Mon May 21 07:39:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Andrushchenko X-Patchwork-Id: 10414063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 12CA9600CC for ; Mon, 21 May 2018 07:39:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0232A28767 for ; Mon, 21 May 2018 07:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB0A0287A3; Mon, 21 May 2018 07:39:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7B51328767 for ; Mon, 21 May 2018 07:39:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A7DC46E2E8; Mon, 21 May 2018 07:39:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 70C996E2E8 for ; Mon, 21 May 2018 07:39:22 +0000 (UTC) Received: by mail-lf0-x243.google.com with SMTP id w202-v6so22437461lff.12 for ; Mon, 21 May 2018 00:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hYIyK40dzSAt8xtRG6XvdGvnLuu6BTU+WBa5Pk2zulE=; b=AKzc0JUMKYde1kXVsX5VTGWZpuDpFWiN4Za3VLh0UdKsDTFbMZtwdzfrs8W2cek7MT WtwLobbOMdd4RtubrjaAOf6CSSs3uRF3vLOJuzZ7URn4t+3/qPCMsVjmyyTFhy6MMQ4G WLOkyH59Kw+/b9sY4WxNKrxf05d+rmCTGdOR+gbd0Avr6I40iwI2ISSS9lX/YXPlKpfT lGmtQWhr5GDf9l6dx9Bi9X7ABeLkZOftXEMeKEMXqxSz/sW1gPyZX0IXWm9AZgYWUWF4 xk4nAwHjrcCP9ef0Tv2nm2CUlE7wf3cDK6Cr0FM8jiGVdeWSTN/vydQwIOC7I1/Zc+e3 NBUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hYIyK40dzSAt8xtRG6XvdGvnLuu6BTU+WBa5Pk2zulE=; b=r7m7rFpKdUJ5WAhI8sJKnKa4SHzAOUEqJXAu0y2h9Sq+4wz2lJ2/N9zRRRlLjbebZE SRTL2hKePJFMvHJVrolQb/b2yyamnokLiUvfDj2OxeXq9nNjG1k9//2XkbZQaI531VaR bo/w3eVKkJ2WUp1cGVZ02b5BuQ2OZAOCTtYP597o9InJczhp5HMAaTFODt2rOhJaanFn DKgNrPOGj7Scy0ffo1Fxq0nFI2P55pzrQ2Hum7ZGjCFnfHY9lcq/IfPOJvXycedLwF9y XcwqHs4TR91bSdcTdYD7MfUOUV4+BUIYO7AnjEbCNz87JElns7ADmeien7szJawMJl9e eZkA== X-Gm-Message-State: ALKqPwdErZivH8ARYQCTsXq4+BKdyHlraCT+CQM02SZELDniIvuDleev BUV4kzvxpONNsdoxF2f++As= X-Google-Smtp-Source: AB8JxZoRMQrAiJn9z5PyOEiWYy7wXg83qiSmmSMEV3oDtn4ukDZnA+0sINSEffcTS2JYoZfLyd291g== X-Received: by 2002:a2e:634e:: with SMTP id x75-v6mr11771823ljb.140.1526888360652; Mon, 21 May 2018 00:39:20 -0700 (PDT) Received: from a2k-HP-ProDesk-600-G2-SFF.kyiv.epam.com (ll-52.209.223.85.sovam.net.ua. [85.223.209.52]) by smtp.gmail.com with ESMTPSA id r15-v6sm2404405ljh.6.2018.05.21.00.39.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 00:39:19 -0700 (PDT) From: Oleksandr Andrushchenko To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, daniel.vetter@intel.com, jgross@suse.com, boris.ostrovsky@oracle.com Subject: [PATCH] drm/xen-front: fix pointer casts Date: Mon, 21 May 2018 10:39:12 +0300 Message-Id: <20180521073912.13510-1-andr2000@gmail.com> X-Mailer: git-send-email 2.17.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: andr2000@gmail.com, Oleksandr Andrushchenko MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Oleksandr Andrushchenko Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to uintptr_t first. Signed-off-by: Oleksandr Andrushchenko --- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h index 2c2479b571ae..8e15dbebc4ba 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.h +++ b/drivers/gpu/drm/xen/xen_drm_front.h @@ -126,12 +126,12 @@ struct xen_drm_front_drm_info { static inline u64 xen_drm_front_fb_to_cookie(struct drm_framebuffer *fb) { - return (u64)fb; + return (u64)(uintptr_t)fb; } static inline u64 xen_drm_front_dbuf_to_cookie(struct drm_gem_object *gem_obj) { - return (u64)gem_obj; + return (u64)(uintptr_t)gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline, diff --git a/drivers/gpu/drm/xen/xen_drm_front_shbuf.c b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c index 8099cb343ae3..47fc93847765 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_shbuf.c +++ b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c @@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) } #define xen_page_to_vaddr(page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page))) static int backend_unmap(struct xen_drm_front_shbuf *buf) {