From: Sean Paul <seanpaul@chromium.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Gustavo Padovan" <gustavo@padovan.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Sean Paul" <seanpaul@chromium.org>,
"David Airlie" <airlied@linux.ie>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Monk Liu" <monk.liu@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Michel Dänzer" <michel.daenzer@amd.com>,
"Chunming Zhou" <david1.zhou@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: fix drm_get_max_iomem type mismatch
Date: Thu, 22 Feb 2018 11:20:31 -0500 [thread overview]
Message-ID: <20180222162031.GF223881@art_vandelay> (raw)
In-Reply-To: <20180222114804.1394300-1-arnd@arndb.de>
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 <arnd@arndb.de>
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
prev parent reply other threads:[~2018-02-22 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 11:47 Arnd Bergmann
2018-02-22 16:20 ` Sean Paul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180222162031.GF223881@art_vandelay \
--to=seanpaul@chromium.org \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=arnd@arndb.de \
--cc=christian.koenig@amd.com \
--cc=david1.zhou@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=michel.daenzer@amd.com \
--cc=monk.liu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®