diff mbox series

[v3,4/4] lib: logic_pio: Fix up some prints

Message ID 1554393602-152448-5-git-send-email-john.garry@huawei.com (mailing list archive)
State New, archived
Headers show
Series Fix system crash for accessing unmapped IO port regions | expand

Commit Message

John Garry April 4, 2019, 4 p.m. UTC
A print in find_io_range() is for a hex number, but doesn't prefix "0x".
Add the prefix, as is the norm.

In the case of the print in logic_pio_trans_cpuaddr(), don't cast the
value to unsigned long long, and just print the resource_size_t type
directly.

Signed-off-by: John Garry <john.garry@huawei.com>
---
 lib/logic_pio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index 3d8d986e9dcb..475d469c1a16 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -126,7 +126,7 @@  static struct logic_pio_hwaddr *find_io_range(unsigned long pio)
 		if (in_range(pio, range->io_start, range->size))
 			return range;
 	}
-	pr_err("PIO entry token %lx invalid\n", pio);
+	pr_err("PIO entry token 0x%lx invalid\n", pio);
 	return NULL;
 }
 
@@ -186,8 +186,7 @@  unsigned long logic_pio_trans_cpuaddr(resource_size_t addr)
 		if (in_range(addr, range->hw_start, range->size))
 			return addr - range->hw_start + range->io_start;
 	}
-	pr_err("addr %llx not registered in io_range_list\n",
-	       (unsigned long long) addr);
+	pr_err("addr %pa not registered in io_range_list\n",  &addr);
 	return ~0UL;
 }