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]
Message-ID: <20200902190650.52c46eb7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 2 Sep 2020 19:06:50 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Dan Murphy <dmurphy@...com>
Cc:     <davem@...emloft.net>, <andrew@...n.ch>, <f.fainelli@...il.com>,
        <hkallweit1@...il.com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v2 3/3] net: dp83869: Add speed optimization
 feature

On Wed, 2 Sep 2020 15:34:44 -0500 Dan Murphy wrote:
> Set the speed optimization bit on the DP83869 PHY.
> 
> Speed optimization, also known as link downshift, enables fallback to 100M
> operation after multiple consecutive failed attempts at Gigabit link
> establishment. Such a case could occur if cabling with only four wires
> (two twisted pairs) were connected instead of the standard cabling with
> eight wires (four twisted pairs).
> 
> The number of failed link attempts before falling back to 100M operation is
> configurable. By default, four failed link attempts are required before
> falling back to 100M.
> 
> Signed-off-by: Dan Murphy <dmurphy@...com>

there seems to be lots of checkpatch warnings here:

ERROR: switch and case should be at the same indent
#111: FILE: drivers/net/phy/dp83869.c:342:
+	switch (cnt) {
+		case DP83869_DOWNSHIFT_1_COUNT:
[...]
+		case DP83869_DOWNSHIFT_2_COUNT:
[...]
+		case DP83869_DOWNSHIFT_4_COUNT:
[...]
+		case DP83869_DOWNSHIFT_8_COUNT:
[...]
+		default:

CHECK: Alignment should match open parenthesis
#139: FILE: drivers/net/phy/dp83869.c:370:
+static int dp83869_get_tunable(struct phy_device *phydev,
+				struct ethtool_tunable *tuna, void *data)

CHECK: Alignment should match open parenthesis
#150: FILE: drivers/net/phy/dp83869.c:381:
+static int dp83869_set_tunable(struct phy_device *phydev,
+				struct ethtool_tunable *tuna, const void *data)

WARNING: please, no spaces at the start of a line
#168: FILE: drivers/net/phy/dp83869.c:669:
+       ret = phy_modify(phydev, DP83869_CFG2, DP83869_DOWNSHIFT_EN,$

ERROR: code indent should use tabs where possible
#169: FILE: drivers/net/phy/dp83869.c:670:
+                        DP83869_DOWNSHIFT_EN);$

WARNING: please, no spaces at the start of a line
#169: FILE: drivers/net/phy/dp83869.c:670:
+                        DP83869_DOWNSHIFT_EN);$

WARNING: please, no spaces at the start of a line
#170: FILE: drivers/net/phy/dp83869.c:671:
+       if (ret)$

WARNING: suspect code indent for conditional statements (7, 15)
#170: FILE: drivers/net/phy/dp83869.c:671:
+       if (ret)
+               return ret;

ERROR: code indent should use tabs where possible
#171: FILE: drivers/net/phy/dp83869.c:672:
+               return ret;$

WARNING: please, no spaces at the start of a line
#171: FILE: drivers/net/phy/dp83869.c:672:
+               return ret;$

total: 3 errors, 5 warnings, 2 checks, 152 lines checked

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ