* [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t
@ 2016-03-15 10:03 Arnd Bergmann
2016-03-15 10:09 ` Joe Perches
2016-03-29 16:04 ` Gregory CLEMENT
0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-03-15 10:03 UTC (permalink / raw)
To: David S . Miller
Cc: Marcin Wojtas, Evan Wang, Gregory CLEMENT, netdev, Arnd Bergmann,
Thomas Petazzoni, Nicolas Schichan, linux-kernel
A recent change to the mbus driver added a warning printk that
prints a phys_addr_t using the %x format string, which fails in
case we build with 64-bit phys_addr_t:
drivers/bus/mvebu-mbus.c: In function 'mvebu_mbus_get_dram_win_info':
drivers/bus/mvebu-mbus.c:975:9: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=]
This uses the special %pa format string instead, so we always
print the correct type.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: f2900acea801 ("bus: mvebu-mbus: provide api for obtaining IO and DRAM window information")
---
The warning was introduced in today's linux-next through the net-next
tree, please apply this fixup on top.
drivers/bus/mvebu-mbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index c2e52864bb03..ce54a0160faa 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -972,7 +972,7 @@ int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr)
}
}
- pr_err("invalid dram address 0x%x\n", phyaddr);
+ pr_err("invalid dram address %pa\n", &phyaddr);
return -EINVAL;
}
EXPORT_SYMBOL_GPL(mvebu_mbus_get_dram_win_info);
--
2.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t
2016-03-15 10:03 [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t Arnd Bergmann
@ 2016-03-15 10:09 ` Joe Perches
2016-03-29 16:04 ` Gregory CLEMENT
1 sibling, 0 replies; 5+ messages in thread
From: Joe Perches @ 2016-03-15 10:09 UTC (permalink / raw)
To: Arnd Bergmann, David S . Miller
Cc: Marcin Wojtas, Evan Wang, Gregory CLEMENT, netdev,
Thomas Petazzoni, Nicolas Schichan, linux-kernel
On Tue, 2016-03-15 at 11:03 +0100, Arnd Bergmann wrote:
> A recent change to the mbus driver added a warning printk that
> prints a phys_addr_t using the %x format string, which fails in
> case we build with 64-bit phys_addr_t:
Hey Arnd.
This is a bad patch subject, %pad is for a dma_addr_t.
The patch subject made me assume the patch was incorrect.
> > This uses the special %pa format string instead, so we always
> print the correct type.
[]
> - pr_err("invalid dram address 0x%x\n", phyaddr);
> + pr_err("invalid dram address %pa\n", &phyaddr);
The patch is good though.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t
2016-03-15 10:03 [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t Arnd Bergmann
2016-03-15 10:09 ` Joe Perches
@ 2016-03-29 16:04 ` Gregory CLEMENT
2016-03-29 19:51 ` Arnd Bergmann
1 sibling, 1 reply; 5+ messages in thread
From: Gregory CLEMENT @ 2016-03-29 16:04 UTC (permalink / raw)
To: Arnd Bergmann
Cc: David S . Miller, Marcin Wojtas, Evan Wang, netdev,
Thomas Petazzoni, Nicolas Schichan, linux-kernel
Hi Arnd,
On mar., mars 15 2016, Arnd Bergmann <arnd@arndb.de> wrote:
> A recent change to the mbus driver added a warning printk that
> prints a phys_addr_t using the %x format string, which fails in
> case we build with 64-bit phys_addr_t:
>
> drivers/bus/mvebu-mbus.c: In function 'mvebu_mbus_get_dram_win_info':
> drivers/bus/mvebu-mbus.c:975:9: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=]
>
> This uses the special %pa format string instead, so we always
> print the correct type.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: f2900acea801 ("bus: mvebu-mbus: provide api for obtaining IO
> and DRAM window information")
What is the status of this patch?
Do you plan to send a second version with the title fixed as suggested
by Joe Perches?
Also do you expect that I collect this patch in the mvebu subsystem?
Thanks,
Gregory
> ---
> The warning was introduced in today's linux-next through the net-next
> tree, please apply this fixup on top.
>
> drivers/bus/mvebu-mbus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
> index c2e52864bb03..ce54a0160faa 100644
> --- a/drivers/bus/mvebu-mbus.c
> +++ b/drivers/bus/mvebu-mbus.c
> @@ -972,7 +972,7 @@ int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr)
> }
> }
>
> - pr_err("invalid dram address 0x%x\n", phyaddr);
> + pr_err("invalid dram address %pa\n", &phyaddr);
> return -EINVAL;
> }
> EXPORT_SYMBOL_GPL(mvebu_mbus_get_dram_win_info);
> --
> 2.7.0
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t
2016-03-29 16:04 ` Gregory CLEMENT
@ 2016-03-29 19:51 ` Arnd Bergmann
2016-03-30 9:37 ` Gregory CLEMENT
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-03-29 19:51 UTC (permalink / raw)
To: Gregory CLEMENT
Cc: David S . Miller, Marcin Wojtas, Evan Wang, netdev,
Thomas Petazzoni, Nicolas Schichan, linux-kernel
On Tuesday 29 March 2016 18:04:47 Gregory CLEMENT wrote:
>
> What is the status of this patch?
>
> Do you plan to send a second version with the title fixed as suggested
> by Joe Perches?
>
> Also do you expect that I collect this patch in the mvebu subsystem?
Right now, it's on my long-term todo list along with some 70 other patches
I need to revisit. If you want to fix up the title and apply it now,
that would be great, otherwise I'll get to it in a few weeks after coming
back from ELC/vacation.
ARnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t
2016-03-29 19:51 ` Arnd Bergmann
@ 2016-03-30 9:37 ` Gregory CLEMENT
0 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2016-03-30 9:37 UTC (permalink / raw)
To: Arnd Bergmann
Cc: David S . Miller, Marcin Wojtas, Evan Wang, netdev,
Thomas Petazzoni, Nicolas Schichan, linux-kernel
Hi Arnd,
On mar., mars 29 2016, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 29 March 2016 18:04:47 Gregory CLEMENT wrote:
>>
>> What is the status of this patch?
>>
>> Do you plan to send a second version with the title fixed as suggested
>> by Joe Perches?
>>
>> Also do you expect that I collect this patch in the mvebu subsystem?
>
> Right now, it's on my long-term todo list along with some 70 other patches
> I need to revisit. If you want to fix up the title and apply it now,
> that would be great, otherwise I'll get to it in a few weeks after coming
> back from ELC/vacation.
So I fixed the title and applied it on mvebu/fixes
Thanks,
Gregory
>
> ARnd
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-30 9:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 10:03 [PATCH] bus: mvebu-mbus: use %pad to print phys_addr_t Arnd Bergmann
2016-03-15 10:09 ` Joe Perches
2016-03-29 16:04 ` Gregory CLEMENT
2016-03-29 19:51 ` Arnd Bergmann
2016-03-30 9:37 ` Gregory CLEMENT
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.