Re: [PATCH net-next v4 1/2] net: phy: move DECLARE_PHY_INTERFACE_MASK_ZERO to core
From: Coia Prant
Date: Tue Nov 17 2026 - 12:26:07 EST
Andrew Lunn <andrew@xxxxxxx> 于2026年11月17日周二 22:04写道:
>
> > I understand your concern that hiding the init inside the macro seems
> > subjective. Since you mentioned an Andrew ack is needed, and he is the
> > net PHY maintainer (who also looks after the WX driver),
>
> I don't look after the WX driver. I comment on it, as i comment on
> lots of drivers.
>
> > If Andrew also feels this doesn't belong in the core, I will drop the
> > macro entirely and switch to explicit manual initialization using
> > phy_interface_zero() in both drivers.
>
> Using phy_interface_zero() is what current code does. I would also say
> using explicate = {0, } is O.K, but i would not hide it in the macro.
>
> Andrew
Hi Andrew,
Sorry for the misunderstanding, I won't make assumptions about the
maintainership next time.
Thanks for the clear guidance on the macro. I'll drop
DECLARE_PHY_INTERFACE_MASK_ZERO() entirely.
In v5, I will use the explicit initialization directly at the
declaration site in both txgbe and the XPCS driver:
DECLARE_PHY_INTERFACE_MASK(supported_interfaces) = { 0 };
This removes the buggy macro from the WX driver while keeping the
initialization completely explicit and visible.
I'll send out v5 with this fix and the lore links in the cover letter.
Coia