From: Dan Carpenter Date: Wed, 4 Jan 2012 07:26:10 +0000 (+0300) Subject: gma500: silence gcc warnings in mid_get_vbt_data() X-Git-Tag: upstream/snapshot3+hdmi~8389^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96067adf55bd93618cec4b6de08aebaad8203c9b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git gma500: silence gcc warnings in mid_get_vbt_data() 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 Acked-by: Alan Cox Signed-off-by: Dave Airlie --- 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;