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:   Thu, 01 Aug 2019 17:21:04 +0000
From:   René van Dorst <opensource@...rst.com>
To:     davem@...emloft.net
Cc:     netdev@...r.kernel.org, frank-w@...lic-files.de,
        sean.wang@...iatek.com, f.fainelli@...il.com,
        matthias.bgg@...il.com, andrew@...n.ch, vivien.didelot@...il.com,
        john@...ozen.org, linux-mediatek@...ts.infradead.org,
        linux-mips@...r.kernel.org, robh+dt@...nel.org,
        devicetree@...r.kernel.org,
        Russell King - ARM Linux admin <linux@...linux.org.uk>
Subject: Re: [PATCH net-next 1/3] net: dsa: mt7530: Convert to PHYLINK API

Quoting Russell King - ARM Linux admin <linux@...linux.org.uk>:

> Hi,
>
> Just a couple of minor points.
>
> On Wed, Jul 24, 2019 at 09:25:47PM +0200, René van Dorst wrote:

<snip>

>> +
>> +static void mt7530_phylink_validate(struct dsa_switch *ds, int port,
>> +				    unsigned long *supported,
>> +				    struct phylink_link_state *state)
>> +{
>> +	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
>> +
>> +	switch (port) {
>> +	case 0: /* Internal phy */
>> +	case 1:
>> +	case 2:
>> +	case 3:
>> +	case 4:
>> +		if (state->interface != PHY_INTERFACE_MODE_NA &&
>> +		    state->interface != PHY_INTERFACE_MODE_GMII)
>> +			goto unsupported;
>> +		break;
>> +	/* case 5: Port 5 not supported! */
>> +	case 6: /* 1st cpu port */
>> +		if (state->interface != PHY_INTERFACE_MODE_NA &&
>> +		    state->interface != PHY_INTERFACE_MODE_RGMII &&
>> +		    state->interface != PHY_INTERFACE_MODE_TRGMII)
>> +			goto unsupported;
>> +		break;
>> +	default:
>> +		linkmode_zero(supported);
>> +		dev_err(ds->dev, "%s: unsupported port: %i\n", __func__, port);
>
> You could reorder this as:
>
> 	default:
> 		dev_err(ds->dev, "%s: unsupported port: %i\n", __func__, port);
> 	unsupported:
> 		linkmode_zero(supported);
>

Hi David,

> and save having the "unsupported" at the end of the function.  Not sure
> what DaveM would think of it though.

Can you give your option about this?
So I know what to do with it and make a new series.

Greats,

René

>
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
> According to speedtest.net: 11.9Mbps down 500kbps up



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ