Re: [PATCH] net: stmmac: Initialize the other members except the est->lock

From: Jakub Kicinski
Date: Tue May 07 2024 - 22:03:57 EST


On Sat, 4 May 2024 07:18:04 +0800 Xiaolei Wang wrote:
> Reinitialize the whole est structure would also reset the mutex lock
> which is embedded in the est structure, and then trigger the following
> warning. To address this, define all the other members except mutex lock
> as a struct group and use that for the reinitialization. We also need
> to require the mutex lock when doing this initialization.

Seems better to move the lock outside of the struct to
struct plat_stmmacenet_data.