From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Dave Airlie <airlied@redhat.com>, Alan Cox <alan@linux.intel.com>
Subject: [patch] gma500: silence gcc warnings in mid_get_vbt_data()
Date: Wed, 04 Jan 2012 07:26:10 +0000 [thread overview]
Message-ID: <20120104072610.GH30978@elgon.mountain> (raw)
Add a cast here to silence a Gcc warning.
drivers/gpu/drm/gma500/mid_bios.c:214:28: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Compile tested only.
diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c
index 55fee10..5eee9ad 100644
--- a/drivers/gpu/drm/gma500/mid_bios.c
+++ b/drivers/gpu/drm/gma500/mid_bios.c
@@ -202,7 +202,7 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
/*so, some values have changed location*/
new_size = vbt->checksum; /*checksum contains lo size byte*/
/*LSB of oaktrail_gct contains hi size byte*/
- new_size |= ((0xff & (unsigned int)vbt->oaktrail_gct)) << 8;
+ new_size |= ((0xff & (unsigned int)(long)vbt->oaktrail_gct)) << 8;
vbt->checksum = vbt->size; /*size contains the checksum*/
if (new_size > 0xff)
@@ -211,8 +211,8 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
vbt->size = new_size;
/* number of descriptors defined in the GCT */
- number_desc = ((0xff00 & (unsigned int)vbt->oaktrail_gct)) >> 8;
- bpi = ((0xff0000 & (unsigned int)vbt->oaktrail_gct)) >> 16;
+ number_desc = ((0xff00 & (unsigned int)(long)vbt->oaktrail_gct)) >> 8;
+ bpi = ((0xff0000 & (unsigned int)(long)vbt->oaktrail_gct)) >> 16;
vbt->oaktrail_gct = ioremap(addr + GCT_R10_HEADER_SIZE,
GCT_R10_DISPLAY_DESC_SIZE * number_desc);
pGCT = vbt->oaktrail_gct;
next reply other threads:[~2012-01-04 7:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 7:26 Dan Carpenter [this message]
2012-01-04 11:48 ` [patch] gma500: silence gcc warnings in mid_get_vbt_data() Alan Cox
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=20120104072610.GH30978@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=alan@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=paul.gortmaker@windriver.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