[PATCH net] net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint
Madalin Bucur (OSS)
madalin.bucur at oss.nxp.com
Wed Oct 30 06:34:04 PDT 2024
> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean at nxp.com>
> Sent: Tuesday, October 29, 2024 6:31 PM
> To: netdev at vger.kernel.org; Radu-Andrei Bulie <radu-andrei.bulie at nxp.com>
> Cc: David S. Miller <davem at davemloft.net>; Eric Dumazet
> <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni
> <pabeni at redhat.com>; Breno Leitao <leitao at debian.org>; Madalin Bucur
> <madalin.bucur at nxp.com>; Ioana Ciornei <ioana.ciornei at nxp.com>; Christophe
> Leroy <christophe.leroy at csgroup.eu>; Sean Anderson
> <sean.anderson at linux.dev>; linux-kernel at vger.kernel.org; linuxppc-
> dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org
> Subject: [PATCH net] 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: eb11ddf36eb8 ("dpaa_eth: add trace points")
> Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> ---
> Context: https://lore.kernel.org/oe-kbuild-all/20241028-sticky-refined-lionfish-
> b06c0c at leitao/
Acked-by: Madalin Bucur <madalin.bucur at oss.nxp.com>
More information about the linux-arm-kernel
mailing list