Re: [PATCH net-next v2 1/7] net: ethernet: oa_tc6: Forward declare struct mii_bus

From: Alvin Šipraga

Date: Tue Nov 10 2026 - 04:54:51 EST


On Mon, Nov 09, 2026 at 10:59:46AM +0200, Iustin Stolniceanu wrote:
> The Clause 45 MDIO accessors in oa_tc6.h take a struct mii_bus pointer,
> but the header does not declare the type. A file that includes oa_tc6.h
> before linux/phy.h or linux/mdio.h gets a "'struct mii_bus' declared
> inside parameter list" warning, which is an error with CONFIG_WERROR.
>
> lan865x and adin1140 are not affected, as they include one of those
> first. The adin1110 driver, which gets OA TC6 support later in this
> series, does not, and hits the warning.
>
> Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@xxxxxxxxxx>

Reviewed-by: Alvin Šipraga <alvin.sipraga@xxxxxxxxxx>

> ---
> include/linux/oa_tc6.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/oa_tc6.h b/include/linux/oa_tc6.h
> index 27f652d4920b..6eac6b842156 100644
> --- a/include/linux/oa_tc6.h
> +++ b/include/linux/oa_tc6.h
> @@ -64,6 +64,7 @@
> #define OA_TC6_PHY_C45_AUTO_NEG_MMS5 5 /* MMD 7 */
> #define OA_TC6_PHY_C45_POWER_UNIT_MMS6 6 /* MMD 13 */
>
> +struct mii_bus;
> struct oa_tc6;
>
> enum oa_tc6_quirk_flag {
> --
> 2.43.0
>