Skip to contentSkip to conversation

GPU: vgaarb, use %p in pointers prints

PATCH In review Jiri Slaby 2 participants 2 messages Aug 22, 2009 – Aug 25, 2009

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 GPU: vgaarb, use %p in pointers prints

To avoid compiler warnings about different size, remove pointer-to-int cast and use %p directly.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Tiago Vignatti <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Jesse Barnes <[email protected]>
---
 drivers/gpu/vga/vgaarb.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/vga/vgaarb.c +5 -5
index 199138f..2f69cd0 100644
@@ -831,7 +831,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
 		curr_pos += 5;
 		remaining -= 5;
 
-		pr_devel("client 0x%X called 'lock'\n", (int)priv);
+		pr_devel("client %p called 'lock'\n", priv);
 
 		if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) {
 			ret_val = -EPROTO;
@@ -867,7 +867,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
 		curr_pos += 7;
 		remaining -= 7;
 
-		pr_devel("client 0x%X called 'unlock'\n", (int)priv);
+		pr_devel("client %p called 'unlock'\n", priv);
 
 		if (strncmp(curr_pos, "all", 3) == 0)
 			io_state = VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM;
@@ -917,7 +917,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
 		curr_pos += 8;
 		remaining -= 8;
 
-		pr_devel("client 0x%X called 'trylock'\n", (int)priv);
+		pr_devel("client %p called 'trylock'\n", priv);
 
 		if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) {
 			ret_val = -EPROTO;
@@ -960,7 +960,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
 
 		curr_pos += 7;
 		remaining -= 7;
-		pr_devel("client 0x%X called 'target'\n", (int)priv);
+		pr_devel("client %p called 'target'\n", priv);
 		/* if target is default */
 		if (!strncmp(buf, "default", 7))
 			pdev = pci_dev_get(vga_default_device());
@@ -1014,7 +1014,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
 	} else if (strncmp(curr_pos, "decodes ", 8) == 0) {
 		curr_pos += 8;
 		remaining -= 8;
-		pr_devel("vgaarb: client 0x%X called 'decodes'\n", (int)priv);
+		pr_devel("vgaarb: client %p called 'decodes'\n", priv);
 
 		if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) {
 			ret_val = -EPROTO;
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 2 lines · On Sat, 22 Aug 2009 20:56:43 +0200 Jiri Slaby <[email protected]> wrote:

To avoid compiler warnings about different size, remove pointer-to-int cast and use %p directly.

Already got one like this from Dave and just applied it to my linux-next branch. If there's anything missing, please send a followup.

Thanks,

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center