Hi Florian,

Florian Fainelli <f.faine...@gmail.com> writes:

> +static inline struct dsa_port *dsa_ds_get_cpu_dp(struct dsa_switch *ds)
> +{
> +     return &ds->ports[fls(ds->cpu_port_mask) - 1];
> +}

So as I said in v2, now that a driver is guaranteed that dp->cpu_dp is
correctly assigned at setup time, isn't better (especially for future
multi-CPU support) to provide an helper which returns the CPU port for a
given port? i.e. dsa_get_cpu_port(struct dsa_switch *ds, int port).

Or is there something blocking? I might be wrong.

Note that I'm suggesting s/dsa_ds_get_cpu_dp/dsa_get_cpu_port/ since
public DSA API does not need to use variable shortcuts such as ds or dp,
but that's a minor suggestion?

Thanks,

        Vivien

Reply via email to