From: Helge Deller <deller@gmx.de>
To: Krzysztof Kozlowski <krzk@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parisc: Use proper printk format for resource_size_t
Date: Tue, 14 Jan 2020 09:27:35 +0100 [thread overview]
Message-ID: <82e79053-00bf-283e-458d-0b2711258585@gmx.de> (raw)
In-Reply-To: <20200103163925.3967-1-krzk@kernel.org>
On 03.01.20 17:39, Krzysztof Kozlowski wrote:
> resource_size_t should be printed with its own size-independent format
> to fix warnings when compiling on 64-bit platform (e.g. with
> COMPILE_TEST):
>
> arch/parisc/kernel/drivers.c: In function 'print_parisc_device':
> arch/parisc/kernel/drivers.c:892:9: warning:
> format '%p' expects argument of type 'void *',
> but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> arch/parisc/kernel/drivers.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
> index a6c9f49c6612..a154de424421 100644
> --- a/arch/parisc/kernel/drivers.c
> +++ b/arch/parisc/kernel/drivers.c
> @@ -889,8 +889,8 @@ static void print_parisc_device(struct parisc_device *dev)
> static int count;
>
> print_pa_hwpath(dev, hw_path);
> - pr_info("%d. %s at 0x%px [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
> - ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
> + pr_info("%d. %s at %pa[p] [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
It needs to be %pap instead of %pa[p].
The documentation in Documentation/core-api/printk-formats.rst is correct, but misleading.
I corrected & applied it.
Thanks!
Helge
> + ++count, dev->name, &(dev->hpa.start), hw_path, dev->id.hw_type,
> dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
>
> if (dev->num_addrs) {
>
next prev parent reply other threads:[~2020-01-14 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 16:39 [PATCH] parisc: Use proper printk format for resource_size_t Krzysztof Kozlowski
2020-01-14 8:27 ` Helge Deller [this message]
2020-01-14 8:53 ` Krzysztof Kozlowski
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=82e79053-00bf-283e-458d-0b2711258585@gmx.de \
--to=deller@gmx.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).