All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: dri-devel@lists.freedesktop.org
Cc: "David Lechner" <david@lechnology.com>,
	"Michel Dänzer" <michel.daenzer@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Monk Liu" <monk.liu@amd.com>
Subject: [PATCH] drm: drm_memory: fix compiler warning on 32-bit targets
Date: Mon, 19 Feb 2018 17:00:06 -0600	[thread overview]
Message-ID: <1519081206-29209-1-git-send-email-david@lechnology.com> (raw)

The end field of struct resource is unsigned long, so on 32-bit targets,
this is a 32-bit value. This results in a compiler warning of "warning:
comparison of distinct pointer types lacks a cast". Fix it by making
max_iomem unsigned long to match the end field.

Fixes: (82626363a217 "drm: add func to get max iomem address v2")
Signed-off-by: David Lechner <david@lechnology.com>
---
 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 7ca500b..597f496 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;
+	unsigned long max_iomem = 0;
 
 	for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) {
 		max_iomem = max(max_iomem,  tmp->end);
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-02-19 23:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 23:00 David Lechner [this message]
2018-02-19 23:08 ` [PATCH] drm: drm_memory: fix compiler warning on 32-bit targets David Lechner

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=1519081206-29209-1-git-send-email-david@lechnology.com \
    --to=david@lechnology.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.