Received: by 10.223.185.116 with SMTP id b49csp2119552wrg; Thu, 22 Feb 2018 08:25:46 -0800 (PST) X-Google-Smtp-Source: AH8x224f190O1p/FbDku+S9IyGtQdX5lKjdZBNOJ/igJYuAhnsdxBRyYq0A0rF281C8vLQw32Vcm X-Received: by 10.99.114.77 with SMTP id c13mr6193112pgn.8.1519316745906; Thu, 22 Feb 2018 08:25:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519316745; cv=none; d=google.com; s=arc-20160816; b=puArVQh11cV6fztTI32HJPkPiy9JrSxC1+C817H8aRfWzrP6K72ztQBQxPQf6i5XSW 0hTE+8BArPGGDSjMet1leSY4wPTEvwoYDrL6HjPWYmGpBsga7JjdCRH34NSO5cdfvcsc Sv/vMefaPcourkC3nWmQJm9FNQBqoyoDHYXVRT6YCOlB8XrY476qvBppvF4kBTE9Pjjf fCrD8PEKPaufXYYLH9wan7onV7Sld3HyLzgpPXZr0blZcUR/cHHGvXzJCB4T9PWbIumH Hq6W537J13nXoWsIYk4Bw0oOBF5rLPnUJUPrSBC8/McZjFK9N3kYskHjvo0jWE6s5TLr /xcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=2IrfBQ/+rBcOes32mI+UQmJ0xg83rtbfPbBb8Xc6syw=; b=IrJrkZc7Q3GU3XLnoHRmkGeSeo6ErHmcmj1pekXIKVocwnSzZ2cIWPPT8DY2msKoGx WZi+fR7JIy8QNIrv7oqt+jhHHkgvKKhu29FZvpaRqQyOiEUV2uFE7QA7IdtxvwzLSjb3 cQqR4PQAEhQTHe9qdlkltZxXVpauXckkbWzNVH9JLzu/begS4AOcq3rEV9lRnxE5RSxJ 7yBxmzw/LecfXun81iDRLPf99PuaOFm+v27hek2xOkSQsRewZZpZPMAgrkrGyWPB7u08 k0JhlVNeI9JaOc3X/WqoCiltaplKdjwzsv/NcEh6JXWMWRDXhKdfunq3wiwK5IKy310N AXuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FGwEAIBf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92-v6si260134pli.180.2018.02.22.08.25.31; Thu, 22 Feb 2018 08:25:45 -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; dkim=pass header.i=@chromium.org header.s=google header.b=FGwEAIBf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933327AbeBVQUg (ORCPT + 99 others); Thu, 22 Feb 2018 11:20:36 -0500 Received: from mail-yw0-f194.google.com ([209.85.161.194]:33072 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933134AbeBVQUd (ORCPT ); Thu, 22 Feb 2018 11:20:33 -0500 Received: by mail-yw0-f194.google.com with SMTP id l200so1859515ywb.0 for ; Thu, 22 Feb 2018 08:20:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2IrfBQ/+rBcOes32mI+UQmJ0xg83rtbfPbBb8Xc6syw=; b=FGwEAIBfgpXIq1x68hGeXM9KZJFn0urAl8qw9Kk0YJPHGAS5ew9I4elVOkpNF6CCYa L4r/75O68psAZfnGcUdaODXpRpS3MMGCCZoMU+HD2UYVjBJ58F0Mn9ojbYPWjHzoDo+8 VOU3hHhAVALV1NZMrcehyG8UA1Rtl+f6m0nNA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2IrfBQ/+rBcOes32mI+UQmJ0xg83rtbfPbBb8Xc6syw=; b=mgAyAi+05rUA3cD31X9Kmy8WnhQvAxBF217kGcNMVGEPK9aJeWOhqgmiLRyoxPEi3V 1gY/UN4TEeMOo7bckAks4y1N5SeO5lyRHHz1HeH91M9duKMHkhB6qmGQqS4D3cTtGjM4 RFKDyeUCudmXFjEBCcEZTeJqWXwzgOyCSCzCZpW350bMPeLFhehN7Wv8SoKocEp6GWmx dDD9ZeYIb6GMBXPU63vAW5cLWeKCIbn71F83Xnt/gkB1Tne8d0Upni2svfRTXe98cCGi WvV1tCU0MLfGXTCcf8YFdHxqVVEitGJtPAVDE9yjItjKUQF8HY6yYjkZZ2LYLKtN0QfX 5zaw== X-Gm-Message-State: APf1xPD+kY5kyrj57U3v/C6Vjrf9U7UjaxfEAPaEkbUUil44LgfdrXPA gYgpM4ic3nrBeOY4M+1nasOyYA== X-Received: by 10.129.122.77 with SMTP id v74mr2903161ywc.139.1519316432389; Thu, 22 Feb 2018 08:20:32 -0800 (PST) Received: from localhost ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id n64sm171605ywc.4.2018.02.22.08.20.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2018 08:20:31 -0800 (PST) Date: Thu, 22 Feb 2018 11:20:31 -0500 From: Sean Paul To: Arnd Bergmann Cc: Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , Alex Deucher , Monk Liu , Christian =?iso-8859-1?Q?K=F6nig?= , Michel =?iso-8859-1?Q?D=E4nzer?= , Chunming Zhou , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: fix drm_get_max_iomem type mismatch Message-ID: <20180222162031.GF223881@art_vandelay> References: <20180222114804.1394300-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222114804.1394300-1-arnd@arndb.de> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 12:47:51PM +0100, Arnd Bergmann wrote: > 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 Thanks Arnd, I've applied this to drm-misc-next. Sean > --- > 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 > -- Sean Paul, Software Engineer, Google / Chromium OS