> On Fri, Jul 31, 2026 at 5:03 PM Lorenzo Bianconi wrote: > > > > Is it a false-positive? I can't see how sizeof((arr)[0]) can be 0 here. > > `CONFIG_SMP` is not set, so the spinlock is empty, no? ack, right. We can just use AIROHA_NUM_NETDEV_TX_RINGS instead of ARRAY_SIZE(). diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c index dba7c52c0896..64619e9a704d 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c @@ -3467,7 +3467,7 @@ static int airoha_alloc_gdm_device(struct airoha_eth *eth, netdev->dev.of_node = of_node_get(np); dev = netdev_priv(netdev); u64_stats_init(&dev->stats.syncp); - for (i = 0; i < ARRAY_SIZE(dev->txq_lock); i++) + for (i = 0; i < AIROHA_NUM_NETDEV_TX_RINGS; i++) spin_lock_init(&dev->txq_lock[i]); dev->port = port; dev->eth = eth; Regards, Lorenzo > > Cheers, > Miguel