From patchwork Thu Feb 22 11:47:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10235267 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 65AF860349 for ; Thu, 22 Feb 2018 11:48:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 666A22891F for ; Thu, 22 Feb 2018 11:48:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A58128925; Thu, 22 Feb 2018 11:48:20 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 ECF362891F for ; Thu, 22 Feb 2018 11:48:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C0AC6ED59; Thu, 22 Feb 2018 11:48:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA25D6ED59 for ; Thu, 22 Feb 2018 11:48:15 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MPKwG-1etFCQ2U2i-004UoO; Thu, 22 Feb 2018 12:48:06 +0100 From: Arnd Bergmann To: Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie Subject: [PATCH] drm: fix drm_get_max_iomem type mismatch Date: Thu, 22 Feb 2018 12:47:51 +0100 Message-Id: <20180222114804.1394300-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:dQbMdoy6l01x5BYi/1a3Eg9r5f5pXaHyIKXwxQLBzmGEO1OgDDg jgafhRtHgknWg9gUKahTxay6u5a+wi737Z08YdO9Zo2CpDSzBJZwW+GE8bOw7zJMQQKsigH DKg/1YO2aH9FGCAU3FF4+5b8KK+NEc4G8jKbpfAIdai0QKCrOe8jx1fBmf+W55cSZuHds95 ZBxJX6tcN7IwHuFqbxefQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:kthamrG6Y4s=:6Tq3+lk+2HikqJJmthMYf6 KLxc5PAoa2Bq6SKAq5wzUp1DHuy4EogIUAtU28ouUpnZkMFM7lOQZeP+Jj+bdiAy1G4gOALCD BCiI/fXbffgwmZfnWmJb/L6udfYJHfH5PdphZ+a86/mTNWA3G3+chzkKGbG5Ue+hzx/PjGQuE /Zn3WIFjD++yOzubw9nj/95D6lZg/kxAWDqDKkmuubb+Vd98Ezk8+WdH8uBo4T4/Mmeo+O/FH Tldm6LaOysMAC7qLEWHzZYUaNm2XHqV1C8ygnht/exgRmrNYRAWNvBvvsoRg6pUgHKlU35apL YtEV7nHZHcRf8QKWn3ubKbOljgd/TvYw3kVjsF4++Xb+UqzC5U2Nz5SjgH+wJJtAhnQ0N48Zc tAmBDqaXmBKq4dobj5E9GVPDINgEbLkh6+SHSQcjlxzONvkV3cnV1mFUghvRMnPsOJwmJEhLM 6P01Bm4HoSBkZZWe67tckM9S0xzsPv7V7lNW7UwswKk8vuCu6IrNqkeiNsdTeSuHqz7DSKd9m QOfoTJZrrXfCrfIp2IqXEDVjxD0BiDTe2paJ/SGc3c0AqFIu5vMW4VDaVcMZucYGluN3lnvfb nu8z1t5s5c6UqhXlfiu+4PoF9YzpCNAMAJYWqdEjTQXcNppTLo4Xfe5eAjrEFb4tOJpYWbM18 DM2arKb/RDcHDi+9bwhrnWJZ4WNR8rf1v44GMTEI1TZTmw/3rPNCIbSDbTj2owt6IhOD7JqWG OcMsIxnKQW4fEwgzM85xmMecPmrAc2RfZilVwA== 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: Arnd Bergmann , =?UTF-8?q?Michel=20D=C3=A4nzer?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Monk Liu MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When comparing two variables with min()/max(), they should be the same type: drivers/gpu/drm/drm_memory.c: In function 'drm_get_max_iomem': include/linux/kernel.h:821:16: error: comparison of distinct pointer types lacks a cast [-Werror] (void) (&max1 == &max2); This makes the local variable in drm_get_max_iomem make the type from resource->end. Fixes: 82626363a217 ("drm: add func to get max iomem address v2") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/drm_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 7ca500b8c399..3c54044214db 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -153,7 +153,7 @@ EXPORT_SYMBOL(drm_legacy_ioremapfree); u64 drm_get_max_iomem(void) { struct resource *tmp; - u64 max_iomem = 0; + resource_size_t max_iomem = 0; for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) { max_iomem = max(max_iomem, tmp->end);