* [PATCH] fjes: fix format string for trace output
@ 2016-10-17 14:30 Arnd Bergmann
2016-10-17 17:08 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-10-17 14:30 UTC (permalink / raw)
To: David S. Miller; +Cc: Arnd Bergmann, Taku Izumi, netdev, linux-kernel
phys_addr_t may be wider than a pointer and has to be printed
using the special %pap format string, as pointed out by
this new warning.
arch/x86/include/../../../drivers/net/fjes/fjes_trace.h: In function ‘trace_raw_output_fjes_hw_start_debug_req’:
arch/x86/include/../../../drivers/net/fjes/fjes_trace.h:212:563: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
Note that this has to pass the address by reference instead of
casting it to a different type.
Fixes: b6ba737d0b29 ("fjes: ethtool -w and -W support for fjes driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/fjes/fjes_trace.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fjes/fjes_trace.h b/drivers/net/fjes/fjes_trace.h
index 22e8f1a4f9ee..cca01a1b3d64 100644
--- a/drivers/net/fjes/fjes_trace.h
+++ b/drivers/net/fjes/fjes_trace.h
@@ -222,8 +222,8 @@ TRACE_EVENT(fjes_hw_start_debug_req,
__entry->mode = req_buf->start_trace.mode;
__entry->buffer = req_buf->start_trace.buffer[0];
),
- TP_printk("req_buf=[length=%d, mode=%d, buffer=%p]",
- __entry->length, __entry->mode, (void *)__entry->buffer)
+ TP_printk("req_buf=[length=%d, mode=%d, buffer=%pap]",
+ __entry->length, __entry->mode, &__entry->buffer)
);
TRACE_EVENT(fjes_hw_start_debug,
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] fjes: fix format string for trace output
2016-10-17 14:30 [PATCH] fjes: fix format string for trace output Arnd Bergmann
@ 2016-10-17 17:08 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-17 17:08 UTC (permalink / raw)
To: arnd; +Cc: izumi.taku, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 17 Oct 2016 16:30:57 +0200
> phys_addr_t may be wider than a pointer and has to be printed
> using the special %pap format string, as pointed out by
> this new warning.
>
> arch/x86/include/../../../drivers/net/fjes/fjes_trace.h: In function ‘trace_raw_output_fjes_hw_start_debug_req’:
> arch/x86/include/../../../drivers/net/fjes/fjes_trace.h:212:563: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>
> Note that this has to pass the address by reference instead of
> casting it to a different type.
>
> Fixes: b6ba737d0b29 ("fjes: ethtool -w and -W support for fjes driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
When a patch is targetting 'net-next' please indicate this in the
subject line by saying "[PATCH net-next]" etc. And likewise for
'net'.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-17 17:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 14:30 [PATCH] fjes: fix format string for trace output Arnd Bergmann
2016-10-17 17:08 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox