Re: [PATCH net v5] net: txgbe: fix stack size for PHY interface mask
From: Paolo Abeni
Date: Mon Nov 23 2026 - 09:36:36 EST
On 11/17/26 18:55, Coia Prant wrote:
The DECLARE_PHY_INTERFACE_MASK_ZERO() macro currently defined in the
txgbe driver incorrectly uses PHY_INTERFACE_MODE_MAX as the array
length instead of BITS_TO_LONGS(). This allocates significantly more
space on the stack than necessary.
Since hiding the zero-initialization inside a macro is discouraged,
drop the local macro entirely and use the standard
DECLARE_PHY_INTERFACE_MASK() with explicit zero-initialization at the
declaration site instead.
Fixes: 47f848aac4e7 ("net: txgbe: initialize PHY interface to 0")
Signed-off-by: Coia Prant <coiaprant@xxxxxxxxx>
Cc: Jiawen Wu <jiawenwu@xxxxxxxxxxxxxx>
As already mentioned, IMHO this is net-next material, not worthy a
fixes tag.
No need to repost, I'll fix while I'll apply it.
/P