lkml.org 
[lkml]   [2019]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 4/4] lib: logic_pio: Fix up some prints
Date
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 --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
\
 
 \ /
  Last update: 2019-04-04 18:01    [W:0.093 / U:6.556 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site