[PATCH net-next v5 2/5] net: spacemit: Add K1 Ethernet MAC
Vivian Wang
wangruikang at iscas.ac.cn
Mon Aug 11 20:10:55 PDT 2025
Hi Andrew,
On 8/12/25 10:17, Andrew Lunn wrote:
>> +/* 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);
Thanks, I'll use assert_spin_locked.
I don't think there's anything else that needs a similar assertion, but
I'll check for sure and update next version.
Vivian "dramforever" Wang
> Andrew
More information about the linux-riscv
mailing list