Subject: Re: [PATCH net-next 2/3] net: phy: marvell10g: add energy detect power down tunable

From: Antoine Tenart <[email-masked]>
Date: Tue, 3 Mar 2020 16:07:41 +0100

Hi Russell,

On Tue, Mar 03, 2020 at 02:44:02PM +0000, Russell King wrote:
>  drivers/net/phy/marvell10g.c | 111 ++++++++++++++++++++++++++++++++++-
>  
> +static int mv3310_maybe_reset(struct phy_device *phydev, u32 unit, bool reset)
> +{
> +	int retries, val, err;
> +
> +	if (!reset)
> +		return 0;

You could also call mv3310_maybe_reset after testing the 'reset'
condition, that would make it easier to read the code.

>  static struct phy_driver mv3310_drivers[] = {
>  	{
>  		.phy_id		= MARVELL_PHY_ID_88X3310,
> @@ -580,13 +684,14 @@ static struct phy_driver mv3310_drivers[] = {
>  		.name		= "mv88x3310",
>  		.get_features	= mv3310_get_features,
>  		.soft_reset	= genphy_no_soft_reset,
> -		.config_init	= mv3310_config_init,

Having a quick look at the code, it seems this is a leftover and you
don't actually want to remove config_init for the 3310.

Thanks,
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com