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:   Mon, 4 Mar 2019 22:16:08 +0800
From:   Zhangshaokun <zhangshaokun@...ilicon.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "Florian Fainelli" <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH -next] net: dsa: mv88e6xxx: Fix build warning when
 CONFIG_NET_DSA_LEGACY is n

Hi Andrew,

On 2019/3/4 21:26, Andrew Lunn wrote:
> On Mon, Mar 04, 2019 at 08:43:01PM +0800, Shaokun Zhang wrote:
>> When CONFIG_NET_DSA_LEGACY is n, there is a GCC bulid warning:
>> drivers/net/dsa/mv88e6xxx/chip.c:4623:13: warning: ‘mv88e6xxx_ports_cmode_init’ defined but not used [-Wunused-function]
>> static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip)
>> Let's fix it.
> 
> Hi Shaokun, Heiner
> 
> Although this fixes the warning, i suspect there i something wrong
> with the original patch adding mv88e6390x_port_set_cmode(). It should
> also be used without CONFIG_NET_DSA_LEGACY.

I checked the commit-id 2a93c1a3651f ("net: dsa: Allow compiling out legacy support") by Florian.
Do you mean that CONFIG_NET_DSA_LEGACY shall be removed completely? :-)

Thanks,
Shaokun

> 
>      Andrew
> 
> 
>>
>> Fixes: ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode")
>> Cc: Heiner Kallweit <hkallweit1@...il.com>
>> Cc: Andrew Lunn <andrew@...n.ch>
>> Cc: Vivien Didelot <vivien.didelot@...il.com> 
>> Cc: Florian Fainelli <f.fainelli@...il.com> 
>> Cc: "David S. Miller" <davem@...emloft.net>
>> Signed-off-by: Shaokun Zhang <zhangshaokun@...ilicon.com>
>> ---
>>  drivers/net/dsa/mv88e6xxx/chip.c | 16 ++++++++--------
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
>> index e4ad16b2dc38..168d4898c36f 100644
>> --- a/drivers/net/dsa/mv88e6xxx/chip.c
>> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
>> @@ -4620,14 +4620,6 @@ static int mv88e6xxx_smi_init(struct mv88e6xxx_chip *chip,
>>  	return 0;
>>  }
>>  
>> -static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip)
>> -{
>> -	int i;
>> -
>> -	for (i = 0; i < mv88e6xxx_num_ports(chip); i++)
>> -		chip->ports[i].cmode = MV88E6XXX_PORT_STS_CMODE_INVALID;
>> -}
>> -
>>  static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
>>  							int port)
>>  {
>> @@ -4637,6 +4629,14 @@ static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
>>  }
>>  
>>  #if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
>> +static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < mv88e6xxx_num_ports(chip); i++)
>> +		chip->ports[i].cmode = MV88E6XXX_PORT_STS_CMODE_INVALID;
>> +}
>> +
>>  static const char *mv88e6xxx_drv_probe(struct device *dsa_dev,
>>  				       struct device *host_dev, int sw_addr,
>>  				       void **priv)
>> -- 
>> 2.7.4
>>
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ