public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Phil Elwell <phil@raspberrypi.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net: phy: microchip: add downshift tunable support for LAN88xx
Date: Mon, 30 Mar 2026 16:57:05 +0200	[thread overview]
Message-ID: <8e80433fe878322b8c31fc30fe89e85a@tipi-net.de> (raw)
In-Reply-To: <ea58ad33-ac25-4907-8fa5-167479070b97@lunn.ch>

On 30.3.2026 15:01, Andrew Lunn wrote:
>> +	switch (val & LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_MASK) {
>> +	case LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_2:
>> +		*data = 2;
>> +		break;
>> +	case LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_3:
>> +		*data = 3;
>> +		break;
>> +	case LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_4:
>> +		*data = 4;
>> +		break;
>> +	case LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_5:
>> +		*data = 5;
>> +		break;
>> +	}
> 
>> +#define  LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_2	(0 << 2)
>> +#define  LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_3	(1 << 2)
>> +#define  LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_4	(2 << 2)
>> +#define  LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_5	(3 << 2)
> 
> It looks like you can replace the switch statement with a FIELD_GET() + 
> 2.
> 

Thanks for the review, Andrew! I will incorporate both changes and send 
a v2.

Nicolai

>     Andrew
> 
> ---
> pw-bot: cr

  reply	other threads:[~2026-03-30 14:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29 22:41 [PATCH net-next 0/2] net: phy: microchip: add downshift support for LAN88xx Nicolai Buchwitz
2026-03-29 22:41 ` [PATCH 1/2] net: phy: microchip: add downshift tunable " Nicolai Buchwitz
2026-03-30 13:01   ` Andrew Lunn
2026-03-30 14:57     ` Nicolai Buchwitz [this message]
2026-03-30 13:02   ` Andrew Lunn
2026-03-29 22:42 ` [PATCH 2/2] net: phy: microchip: enable downshift by default on LAN88xx Nicolai Buchwitz
2026-03-30 13:03   ` Andrew Lunn
2026-04-01 12:38 ` [PATCH net-next v3 0/2] net: phy: microchip: add downshift support for LAN88xx Nicolai Buchwitz
2026-04-01 12:38   ` [PATCH net-next v3 1/2] net: phy: microchip: add downshift tunable " Nicolai Buchwitz
2026-04-01 12:38   ` [PATCH net-next v3 2/2] net: phy: microchip: enable downshift by default on LAN88xx Nicolai Buchwitz
2026-04-02  1:48   ` [PATCH net-next v3 0/2] net: phy: microchip: add downshift support for LAN88xx Jakub Kicinski
2026-04-02  7:11     ` Nicolai Buchwitz
2026-04-03  1:10   ` patchwork-bot+netdevbpf

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=8e80433fe878322b8c31fc30fe89e85a@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=phil@raspberrypi.com \
    /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