Thread (11 messages) flat view 11 messages, 3 authors, 2014-01-23
STALE4611d

Revision v7 of 4 in this series.

Revisions (4)
  1. v7 [diff vs current]
  2. v7 current
  3. v9 [diff vs current]
  4. v10 [diff vs current]

[PATCH v7 5/6] misc: debug: remove compilation warnings

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2014-01-22 16:11:53

On Wed, Jan 22, 2014 at 02:42:52PM +0000, vijay.kilari at gmail.com wrote:
quoted hunk ↗ jump to hunk
From: Vijaya Kumar K <redacted>

Resolve following compiler warnings
warning: format '%lx' expects argument of type 'long unsigned int',
but argument 2 has type 'u64' [-Wformat]

tested for warnings on arm32 & arm64

Signed-off-by: Vijaya Kumar K <redacted>
---
 drivers/misc/kgdbts.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index 36f5d52..78e10b2 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -350,8 +350,8 @@ static int check_single_step(char *put_str, char *arg)
 	kgdb_hex2mem(&put_str[1], (char *)kgdbts_gdb_regs,
 		 NUMREGBYTES);
 	gdb_regs_to_pt_regs(kgdbts_gdb_regs, &kgdbts_regs);
-	v2printk("Singlestep stopped at IP: %lx\n",
-		   instruction_pointer(&kgdbts_regs));
+	v2printk("Singlestep stopped at IP: %llx\n",
+		   (unsigned long long)instruction_pointer(&kgdbts_regs));
 
 	if (sstep_thread_id != cont_thread_id) {
 		/*
@@ -376,8 +376,8 @@ static int check_single_step(char *put_str, char *arg)
 continue_test:
 	matched_id = 0;
 	if (instruction_pointer(&kgdbts_regs) == addr) {
-		eprintk("kgdbts: SingleStep failed at %lx\n",
-			   instruction_pointer(&kgdbts_regs));
+		eprintk("kgdbts: SingleStep failed at %llx\n",
+			(unsigned long long)instruction_pointer(&kgdbts_regs));
I think we could simply add the cast to the definition of
instruction_pointer() on arm64. Even the generic instruction_pointer()
definition returns unsigned long.

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help