Re: [PATCH v4 5/6] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

From: Andy Shevchenko
Date: Fri Jun 02 2017 - 06:44:01 EST


On Fri, Jun 2, 2017 at 10:34 AM, Jan Kiszka <jan.kiszka@xxxxxxxxxxx> wrote:
> Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr.

> +static const struct stmmac_pci_func_data galileo_stmmac_func_data[] = {
> {
> .func = 6,
> .phy_addr = 1,
> },

> + { },

Now this is redundant.

> +};

> +static const struct stmmac_pci_dmi_data galileo_stmmac_dmi_data = {
> + .func = galileo_stmmac_func_data,
> + .nfuncs = ARRAY_SIZE(galileo_stmmac_func_data),

It will be 2, when is supposed to be 1, see above.

> +};

> +static const struct stmmac_pci_func_data iot2040_stmmac_func_data[] = {

> + { },
> +};

> + .nfuncs = ARRAY_SIZE(iot2040_stmmac_func_data),

Ditto.

--
With Best Regards,
Andy Shevchenko