This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 5a2fa2c3e9ecf1d529c52a31d6ad6eb32548705b Author: ouyangxiangzhen <[email protected]> AuthorDate: Wed Nov 18 19:41:50 2026 +0800 spinlock: use spin_lock_init for runtime lock assignment SP_UNLOCKED/SP_LOCKED are compound literals; they are only valid in initializers, not in assignment statements. The runtime assignment in mpfs_ethernet.c moved the lock to the unlocked state through an assignment, which no longer compiles once the typedef carries the debug info field. Use spin_lock_init() instead, which is the conventional runtime initialization helper. This is a series-original adaptation: the field exists on the upstream master side and there is no corresponding change in the origin history. Assisted-By: mimo-v2.6-pro Signed-off-by: ouyangxiangzhen <[email protected]> --- arch/risc-v/src/mpfs/mpfs_ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/mpfs/mpfs_ethernet.c b/arch/risc-v/src/mpfs/mpfs_ethernet.c index 5ded664a606..ff8df360937 100644 --- a/arch/risc-v/src/mpfs/mpfs_ethernet.c +++ b/arch/risc-v/src/mpfs/mpfs_ethernet.c @@ -3609,7 +3609,7 @@ int mpfs_ethinitialize(int intf) priv->dev.d_private = priv; /* Used to recover private state */ priv->intf = intf; /* Remember the interface number */ priv->regbase = g_regbases[intf]; - priv->lock = SP_UNLOCKED; + spin_lock_init(&priv->lock); priv->mac_q_int[0] = g_irq_numbers[intf][0]; priv->mac_q_int[1] = g_irq_numbers[intf][1]; priv->mac_q_int[2] = g_irq_numbers[intf][2];
