* [PATCH] efifb: Fix "cast to pointer from integer of different size"
@ 2011-04-19 20:38 Mike Waychison
2011-04-20 9:25 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Mike Waychison @ 2011-04-19 20:38 UTC (permalink / raw)
To: Peter Jones, Paul Mundt; +Cc: linux-fbdev, linux-kernel, Mike Waychison
Fix set_system() to not cause a cast warning when printing a u32 as a
pointer:
drivers/video/efifb.c: In function 'set_system':
drivers/video/efifb.c:247: error: cast to pointer from integer of
different size
Allow the integer to print as a pointer by first casting to unsigned
long which we know will be the width of a pointer and at least as wide
as u32.
Signed-off-by: Mike Waychison <mikew@google.com>
---
drivers/video/efifb.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 4eb38db..59e9f06 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -244,8 +244,9 @@ static int set_system(const struct dmi_system_id *id)
printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p "
"(%dx%d, stride %d)\n", id->ident,
- (void *)screen_info.lfb_base, screen_info.lfb_width,
- screen_info.lfb_height, screen_info.lfb_linelength);
+ (void *)(unsigned long)screen_info.lfb_base,
+ screen_info.lfb_width, screen_info.lfb_height,
+ screen_info.lfb_linelength);
return 1;
--
1.7.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] efifb: Fix "cast to pointer from integer of different size"
2011-04-19 20:38 [PATCH] efifb: Fix "cast to pointer from integer of different size" Mike Waychison
@ 2011-04-20 9:25 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-04-20 9:25 UTC (permalink / raw)
To: Mike Waychison; +Cc: Peter Jones, linux-fbdev, linux-kernel
On Tue, Apr 19, 2011 at 01:38:03PM -0700, Mike Waychison wrote:
> Fix set_system() to not cause a cast warning when printing a u32 as a
> pointer:
>
> drivers/video/efifb.c: In function 'set_system':
> drivers/video/efifb.c:247: error: cast to pointer from integer of
> different size
>
> Allow the integer to print as a pointer by first casting to unsigned
> long which we know will be the width of a pointer and at least as wide
> as u32.
>
> Signed-off-by: Mike Waychison <mikew@google.com>
I've already taken another patch that fixed it a slightly different way,
thanks anyways.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-20 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 20:38 [PATCH] efifb: Fix "cast to pointer from integer of different size" Mike Waychison
2011-04-20 9:25 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).