Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Julien Blanc <julien.blanc@sprinte.eu>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"o.rempel@pengutronix.de" <o.rempel@pengutronix.de>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>
Subject: Re: [PATCH v3] Add config phase for dp83td510e phy
Date: Thu, 17 Sep 2026 18:02:31 -0700	[thread overview]
Message-ID: <20260917180231.17dcc86c@kernel.org> (raw)
In-Reply-To: <370d52b3f5da403b5a92226a92cb23cd92c4b4a4.camel@sprinte.eu>

some checkpatch nit picks to address here:

On Tue, 15 Sep 2026 07:15:09 +0000 Julien Blanc wrote:
> +	if (phy_interface_is_rgmii(phydev)) {
> +		rx_int_delay = dp83td510_config_rgmii_rx_delay(phydev);
> +		/* Set DP83TD510E_RX_CLK_SHIFT to enable rx clk internal delay */

nit: we prefer staying under 80 char line width if it doesn't make 
the code less readable. Comments should always be under 80 chars.
You can probably drop this comment completely, IDK what value it adds,
the if below is clear enough

> +		if (rx_int_delay)
> +			rgmii_delay |= DP83TD510E_RX_CLK_SHIFT;
> +
> +		tx_int_delay = dp83td510_config_rgmii_tx_delay(phydev);
> +
> +		/* Set DP83TD510E_TX_CLK_SHIFT to enable tx clk internal delay */

ditto

> +		if (tx_int_delay)
> +			rgmii_delay |= DP83TD510E_TX_CLK_SHIFT;
> +
> +		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, DP83TD510E_RCSR,
> +				     DP83TD510E_RX_CLK_SHIFT | DP83TD510E_TX_CLK_SHIFT,

this is also >80 char but more of a judgement call, up to you

> +				     rgmii_delay);
> +		if (ret)
> +			return ret;
> +
> +		ret = phy_set_bits_mmd(phydev, MDIO_MMD_VEND2,
> +				       DP83TD510E_RCSR, DP83TD510E_RGMII_MODE_EN);
> +
> +		if (ret)
> +			return ret;
> +
> +	} else if (phydev->interface == PHY_INTERFACE_MODE_RMII) {
> +		// set RMII_MODE_EN, clear RGMII_MODE_EN (exclusive)

Okay, but you're mixing comment styles, above you used /**/
(so does the rest of this file)

> +		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, DP83TD510E_RCSR,
> +				     DP83TD510E_RMII_MODE_EN | DP83TD510E_RGMII_MODE_EN,
> +				     DP83TD510E_RMII_MODE_EN);
> +		if (ret)
> +			return ret;
> +	} else {
> +		// may be RMII, which is supported, or something else. Just 
> +		// return success to keep the old behavior and not break 
> +		// anything. Configuration may have been done by straps so 
> +		// it's better to keep as-is.

This comment block has trailing space chars, please clean up

> +		ret = 0;
> +	}
> +
> +	return ret;
> +}

Please use --subject-prefix="PATCH net-next v4" when reposting,
to clearly mark the patch for net-next and add/preserve Andrew's
review tag
-- 
pw-bot: cr

      parent reply	other threads:[~2026-09-18  1:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  7:15 [PATCH v3] Add config phase for dp83td510e phy Julien Blanc
2026-09-15 12:11 ` Andrew Lunn
2026-09-18  1:02 ` Jakub Kicinski [this message]

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=20260917180231.17dcc86c@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=julien.blanc@sprinte.eu \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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