Skip to content

Commit

Permalink
fjes: fix format string for trace output
Browse files Browse the repository at this point in the history
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: b6ba737 ("fjes: ethtool -w and -W support for fjes driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnd Bergmann authored and David S. Miller committed Oct 17, 2016
1 parent 3aaf863 commit ea93900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/fjes/fjes_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ea93900

Please sign in to comment.