From: Mike Waychison <mikew@google.com>
To: Peter Jones <pjones@redhat.com>, Paul Mundt <lethal@linux-sh.org>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Mike Waychison <mikew@google.com>
Subject: [PATCH] efifb: Fix "cast to pointer from integer of different size"
Date: Tue, 19 Apr 2011 20:38:03 +0000 [thread overview]
Message-ID: <1303245483-2799-1-git-send-email-mikew@google.com> (raw)
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
next reply other threads:[~2011-04-19 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 20:38 Mike Waychison [this message]
2011-04-20 9:25 ` [PATCH] efifb: Fix "cast to pointer from integer of different size" Paul Mundt
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=1303245483-2799-1-git-send-email-mikew@google.com \
--to=mikew@google.com \
--cc=lethal@linux-sh.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pjones@redhat.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;
as well as URLs for NNTP newsgroup(s).