[PATCH RFC net-next] net: ethernet: mtk_eth_soc: don't convert byte order of etype
Simon Horman
horms at kernel.org
Thu May 25 07:19:13 PDT 2023
*** This will change the value exposed by debugfs. ***
*** I am unsure if that counts as UABI breakage. ***
*** If so, this patch should be rejected. ***
The type of the etype field of struct mtk_foe_mac_info is u16.
And it is always used to store values on host byte order.
So there is no need to convert it from network to host byte order
when formatting in a string.
Flagged by sparse:
.../mtk_ppe_debugfs.c:161:46: warning: cast to restricted __be16
Compile tested only.
Signed-off-by: Simon Horman <horms at kernel.org>
---
drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
index 316fe2e70fea..7e4213241cc1 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
@@ -158,9 +158,9 @@ mtk_ppe_debugfs_foe_show(struct seq_file *m, void *private, bool bind)
seq_printf(m, " eth=%pM->%pM etype=%04x"
" vlan=%d,%d ib1=%08x ib2=%08x"
" packets=%llu bytes=%llu\n",
- h_source, h_dest, ntohs(l2->etype),
- l2->vlan1, l2->vlan2, entry->ib1, ib2,
- acct ? acct->packets : 0, acct ? acct->bytes : 0);
+ h_source, h_dest, l2->etype, l2->vlan1, l2->vlan2,
+ entry->ib1, ib2, acct ? acct->packets : 0,
+ acct ? acct->bytes : 0);
}
return 0;
More information about the linux-arm-kernel
mailing list