From: David Hildenbrand <david@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH v1] mm/early_remap: Use %pa to print resource_size_t variables
Date: Mon, 9 Dec 2019 18:33:10 +0100 [thread overview]
Message-ID: <28cbce3f-a5f4-838e-b7b2-5c360cd86e06@redhat.com> (raw)
In-Reply-To: <20191209165413.56263-1-andriy.shevchenko@linux.intel.com>
On 09.12.19 17:54, Andy Shevchenko wrote:
> %pa takes into consideration the special types such as resource_size_t.
> Use this specifier %instead of explicit casting.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> mm/early_ioremap.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/early_ioremap.c b/mm/early_ioremap.c
> index 1826f191e72c..a0018ad1a1f6 100644
> --- a/mm/early_ioremap.c
> +++ b/mm/early_ioremap.c
> @@ -121,8 +121,8 @@ __early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
> }
> }
>
> - if (WARN(slot < 0, "%s(%08llx, %08lx) not found slot\n",
> - __func__, (u64)phys_addr, size))
> + if (WARN(slot < 0, "%s(%pa, %08lx) not found slot\n",
> + __func__, &phys_addr, size))
> return NULL;
>
> /* Don't allow wraparound or zero size */
> @@ -158,8 +158,8 @@ __early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
> --idx;
> --nrpages;
> }
> - WARN(early_ioremap_debug, "%s(%08llx, %08lx) [%d] => %08lx + %08lx\n",
> - __func__, (u64)phys_addr, size, slot, offset, slot_virt[slot]);
> + WARN(early_ioremap_debug, "%s(%pa, %08lx) [%d] => %08lx + %08lx\n",
> + __func__, &phys_addr, size, slot, offset, slot_virt[slot]);
>
> prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]);
> return prev_map[slot];
>
Yes, that's what Documentation/core-api/printk-formats.rst wants us to do :)
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2019-12-09 17:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 16:54 Andy Shevchenko
2019-12-09 17:33 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28cbce3f-a5f4-838e-b7b2-5c360cd86e06@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox