lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1303245483-2799-1-git-send-email-mikew@google.com>
Date:	Tue, 19 Apr 2011 13:38:03 -0700
From:	Mike Waychison <mikew@...gle.com>
To:	Peter Jones <pjones@...hat.com>, Paul Mundt <lethal@...ux-sh.org>
Cc:	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mike Waychison <mikew@...gle.com>
Subject: [PATCH] efifb: Fix "cast to pointer from integer of different size"

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@...gle.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ