Message ID | 1553105650-28012-4-git-send-email-john.garry@huawei.com |
---|---|
State | New |
Headers | show |
Series | Fix system crash for accessing unmapped IO port regions | expand |
On Wed, Mar 20, 2019 at 8:14 PM John Garry <john.garry@huawei.com> wrote: > > Some prints in the code are for a hex number, but don't prefix "0x". Add > the prefix, as is the norm. > - pr_err("addr %llx not registered in io_range_list\n", > + pr_err("addr 0x%llx not registered in io_range_list\n", > (unsigned long long) addr); Can we use %pa at the same time? -- With Best Regards, Andy Shevchenko
On 23/03/2019 19:12, Andy Shevchenko wrote: > On Wed, Mar 20, 2019 at 8:14 PM John Garry <john.garry@huawei.com> wrote: >> >> Some prints in the code are for a hex number, but don't prefix "0x". Add >> the prefix, as is the norm. > >> - pr_err("addr %llx not registered in io_range_list\n", >> + pr_err("addr 0x%llx not registered in io_range_list\n", >> (unsigned long long) addr); > > Can we use %pa at the same time? > Hi Andy, OK, I think that we can use %pa and drop the casting to unsigned long long. Thanks for checking, John
On Mon, Mar 25, 2019 at 11:49 AM John Garry <john.garry@huawei.com> wrote: > On 23/03/2019 19:12, Andy Shevchenko wrote: > > On Wed, Mar 20, 2019 at 8:14 PM John Garry <john.garry@huawei.com> wrote: > >> > >> Some prints in the code are for a hex number, but don't prefix "0x". Add > >> the prefix, as is the norm. > > > >> - pr_err("addr %llx not registered in io_range_list\n", > >> + pr_err("addr 0x%llx not registered in io_range_list\n", > >> (unsigned long long) addr); > > > > Can we use %pa at the same time? > OK, I think that we can use %pa and drop the casting to unsigned long long. Yes, that it is the point. -- With Best Regards, Andy Shevchenko
diff --git a/lib/logic_pio.c b/lib/logic_pio.c index 026a4fb4b944..6b37cc79a0bf 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,7 +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", + pr_err("addr 0x%llx not registered in io_range_list\n", (unsigned long long) addr); return ~0UL; }
Some prints in the code are for a hex number, but don't prefix "0x". Add the prefix, as is the norm. Signed-off-by: John Garry <john.garry@huawei.com> --- lib/logic_pio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1