Re: [PATCH net-next v5 2/5] net: spacemit: Add K1 Ethernet MAC

From
Andrew Lunn <andrew@lunn.ch>
Date
2025-08-12 02:17:43
Also in
linux-devicetree, linux-riscv, lkml, spacemit
Reply to
Vivian Wang, 2025-08-12
quoted hunk ↗ jump to hunk
+/* Caller must hold stats_lock */
+static void emac_stats_update(struct emac_priv *priv)
+{
+	u64 *tx_stats_off = (u64 *)&priv->tx_stats_off;
+	u64 *rx_stats_off = (u64 *)&priv->rx_stats_off;
+	u64 *tx_stats = (u64 *)&priv->tx_stats;
+	u64 *rx_stats = (u64 *)&priv->rx_stats;
+	u32 i, res;
Rather than the comment, you could do:

	assert_spin_locked(priv->stats_lock);

	Andrew
Thread (12 messages) 12 messages, 3 authors, last reply 2025-08-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help