Received: by 10.223.185.116 with SMTP id b49csp1823205wrg; Thu, 22 Feb 2018 03:50:08 -0800 (PST) X-Google-Smtp-Source: AH8x225CCWh6RFhOqh13s56qCyZ5yksLUTVmFi2PLuMJs6rsYEP1bmbpQpBPpbyBDu3jXKLJjL5F X-Received: by 10.101.67.71 with SMTP id k7mr5435896pgq.136.1519300208558; Thu, 22 Feb 2018 03:50:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519300208; cv=none; d=google.com; s=arc-20160816; b=VVRO0LATEFcVRwOIwju/qc1SRk+bunLxsFkTGLM4gmBMByPt+9aA5723fPSb/gC2xY S6MKMYeXD/Vg6/WxJ0VgEWpxsm955uSlVB547mjyY1Mc/O/iWutKCCnViwMMWwQp9/+N KhYnID2ZLblg9F1A+/9Ms2vTuICK62WVniMkAVzOp9rYgMh1+fb3g6Tg7WF4Y0GSO6Rk DfCUu86QsZTlkyp8gxiOApMF2opxbn1MBx3zYusCqdKANCOh+VmgtCJwN3hCpnanLMO9 +KkBoClyZ/0fPl09yJgzR0KStSfvM3E82SiAFrbqNzwXYUm0PmzoJOZITxj+pz23U4Tt JzSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qm8VNh8hOchrG3gbLk0JElWL7Al/Y7jtzYLPD599jBs=; b=oNXX8xX8PzGtmN0HI9PhFf5PCkNqsyPZnwDjp6yawlT0mGRORPpJ0NbcZEJ5APa/aF BRCPzMyQUqkRfeUceiVN4QOenujbhXu7hOI9SsKJLxLMAVGdOUx/0Ay5ATeuBJ7evhr4 h0s64B4AHYUnJNaDvfL38ZbimxcChfiJtfJgiD8nKSgoX0HTtnyr5/U2s4Xuhz3Hd5Sw ZunPEKuTSxgzi+h49/6OsJsfVjINWjti5WwskndbyFIthiuR1tg5Yyj/RJVrQmTOi5gJ 8mH6XsfCdchMmLbYG9xz8xIBQgyX/M8uv83JLDFeoNTAC7ov2RQYbj7DxmKFGVp2eKLG bvBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si5234394pgn.696.2018.02.22.03.49.53; Thu, 22 Feb 2018 03:50:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932136AbeBVLsT (ORCPT + 99 others); Thu, 22 Feb 2018 06:48:19 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:46783 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753716AbeBVLsR (ORCPT ); Thu, 22 Feb 2018 06:48:17 -0500 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 Cc: Arnd Bergmann , Alex Deucher , Monk Liu , =?UTF-8?q?Christian=20K=C3=B6nig?= , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Chunming Zhou , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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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ernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.9.0