public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <andrew@lunn.ch>, <f.fainelli@gmail.com>,
	<hkallweit1@gmail.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 3/3] net: dp83869: Add speed optimization feature
Date: Thu, 3 Sep 2020 06:05:06 -0500	[thread overview]
Message-ID: <e302d45f-c928-e6a3-fe40-da3bce978048@ti.com> (raw)
In-Reply-To: <20200902190650.52c46eb7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

Jakub

On 9/2/20 9:06 PM, Jakub Kicinski wrote:
> 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@ti.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

I will fix these.

Dan


  reply	other threads:[~2020-09-03 11:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 20:34 [PATCH net-next v2 0/3] DP83869 Feature additions Dan Murphy
2020-09-02 20:34 ` [PATCH net-next v2 1/3] net: dp83869: Add ability to advertise Fiber connection Dan Murphy
2020-09-02 20:34 ` [PATCH net-next v2 2/3] net: phy: dp83869: support Wake on LAN Dan Murphy
2020-09-02 20:34 ` [PATCH net-next v2 3/3] net: dp83869: Add speed optimization feature Dan Murphy
2020-09-03  2:06   ` Jakub Kicinski
2020-09-03 11:05     ` Dan Murphy [this message]
2020-09-03  4:10   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e302d45f-c928-e6a3-fe40-da3bce978048@ti.com \
    --to=dmurphy@ti.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox