lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Jun 2016 15:13:35 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Andrew Lunn <andrew@...n.ch>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	vivien.didelot@...oirfairelinux.com
Subject: Re: [PATCH net-next v3 5/6] net: dsa: Initialize CPU port ethtool ops
 per tree

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 in dst as a parameter, and then don't use it!

I do use it here:

        memcpy(&dst->master_ethtool_ops, master->ethtool_ops,
               sizeof(struct ethtool_ops));

> 
>> +void dsa_cpu_port_ethtool_restore(struct dsa_switch_tree *dst,
>> +				  struct dsa_switch *ds)
>> +{
>> +	struct net_device *master;
>> +
>> +	master = ds->dst->master_netdev;
> 
> Same here.

and here:

        master->ethtool_ops = dst->master_orig_ethtool_ops;

I sure could simplify that and use ds->dst instead if you find it more
elegant, works for me.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ