On Tue, Jun 07, 2016 at 03:13:35PM -0700, Florian Fainelli wrote:
> On 06/07/2016 02:51 PM, Andrew Lunn wrote:
> >> +int dsa_cpu_port_ethtool_setup(struct dsa_switch_tree *dst,
> >> + struct dsa_switch *ds)
> >> +{
> >> + struct net_device *master;
> >> + struct ethtool_op
On 06/07/2016 02:51 PM, Andrew Lunn wrote:
>> +int dsa_cpu_port_ethtool_setup(struct dsa_switch_tree *dst,
>> + struct dsa_switch *ds)
>> +{
>> +struct net_device *master;
>> +struct ethtool_ops *cpu_ops;
>> +
>> +master = ds->dst->master_netdev;
>
> You pass
> +int dsa_cpu_port_ethtool_setup(struct dsa_switch_tree *dst,
> +struct dsa_switch *ds)
> +{
> + struct net_device *master;
> + struct ethtool_ops *cpu_ops;
> +
> + master = ds->dst->master_netdev;
You pass in dst as a parameter, and then don't use it!
> +
Now that we can properly support multiple distinct trees in the system,
using a global variable: dsa_cpu_port_ethtool_ops is getting clobbered
as soon as the second switch tree gets probed, and we don't want that.
We need to move this to be dynamically allocated, and since we can't
really be compa