Re: [PATCH net-next v6 1/6] net: dsa: motorcomm: initialize dsa_switch based on chipid

From: David Yang

Date: Wed Sep 09 2026 - 12:32:00 EST


On Tue, Sep 8, 2026 at 4:36 PM Kyle Switch <kyle.switch@xxxxxxxxxxxxxx> wrote:
> + if (major == YT9215_MAJOR || major == YT9218_MAJOR)
> + mode = YT92XX_MODE_YT921X;
> +
> + for (i = 0; i < ARRAY_SIZE(yt92xx_series_table); ++i)
> + if (yt92xx_series_table[i].mode == mode)
> + return &yt92xx_series_table[i];

Still redundant lookups here.

> - ds->priv = priv;

ds->priv is gone in the new register.

> static const struct of_device_id yt921x_of_match[] = {
> - { .compatible = "motorcomm,yt9215" },
> - {}
> + {
> + .compatible = "motorcomm,yt9215",
> + },
> + { /* sentinel */ }

Leftovers.