From: Arnd Bergmann <arnd@arndb.de>
To: "David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
Taku Izumi <izumi.taku@jp.fujitsu.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fjes: fix format string for trace output
Date: Mon, 17 Oct 2016 16:30:57 +0200 [thread overview]
Message-ID: <20161017143314.515133-1-arnd@arndb.de> (raw)
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
next reply other threads:[~2016-10-17 14:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 14:30 Arnd Bergmann [this message]
2016-10-17 17:08 ` [PATCH] fjes: fix format string for trace output David Miller
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=20161017143314.515133-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=izumi.taku@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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