[PATCH v3 4/4] lib: logic_pio: Fix up some prints
From: John Garry
Date: Thu Apr 04 2019 - 12:00:34 EST
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@xxxxxxxxxx>
---
lib/logic_pio.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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;
}
--
2.17.1