Skip to content

Commit 0144c06

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint
Sparse warns: note: in included file (through ../include/trace/trace_events.h, ../include/trace/define_trace.h, ../drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h): warning: incorrect type in assignment (different base types) expected unsigned int [usertype] fd_status got restricted __be32 const [usertype] status We take struct qm_fd :: status, store it and print it as an u32, though it is a big endian field. We should print the FD status in CPU endianness for ease of debug and consistency between PowerPC and Arm systems. Though it is a not often used debug feature, it is best to treat it as a bug and backport the format change to all supported stable kernels, for consistency. Fixes: eb11ddf ("dpaa_eth: add trace points") Signed-off-by: Vladimir Oltean <[email protected]> Acked-by: Madalin Bucur <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent badccd4 commit 0144c06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ DECLARE_EVENT_CLASS(dpaa_eth_fd,
5656
__entry->fd_format = qm_fd_get_format(fd);
5757
__entry->fd_offset = qm_fd_get_offset(fd);
5858
__entry->fd_length = qm_fd_get_length(fd);
59-
__entry->fd_status = fd->status;
59+
__entry->fd_status = __be32_to_cpu(fd->status);
6060
__assign_str(name);
6161
),
6262

0 commit comments

Comments
 (0)