Re: [PATCH net-next 3/4] net: dsa: motorcomm: Use u64_stats_t for MIB stats

From: Andrew Lunn

Date: Thu Sep 03 2026 - 13:37:55 EST


On Thu, Sep 03, 2026 at 10:35:08PM +0800, David Yang wrote:
> 64-bit variables might not be atomic on 32-bit architectures, and could
> lead to load/store tearing. Use u64_stats_t to ensure consistency.

Can this patch also be broken up. It should be possible to use
u64_stats_read() without changing the locking? So one patch which only
does u64_stats_read(). You should then be able to add the syncp
code. And lastly the mutex changes. That then allows you to explain
why the mutex changes are safe in the commit message.

Andrew