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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cca8a37b-a648-52ba-c14c-1e1078bc628e@linux.intel.com>
Date:   Tue, 12 Apr 2022 08:17:55 +0800
From:   Zhou Furong <furong.zhou@...ux.intel.com>
To:     alexandru.tachici@...log.com
Cc:     andrew@...n.ch, o.rempel@...gutronix.de, davem@...emloft.net,
        devicetree@...r.kernel.org, hkallweit1@...il.com, kuba@...nel.org,
        LKML <linux-kernel@...r.kernel.org>, linux@...linux.org.uk,
        netdev@...r.kernel.org, robh+dt@...nel.org,
        Alexandru Ardelean <alexandru.ardelean@...log.com>,
        Ramon Fried <rfried.dev@...il.com>
Subject: Re: [PATCH v5 5/7] net: phy: adin1100: Add initial support for
 ADIN1100 industrial PHY

Hi,

>> +static int adin_config_aneg(struct phy_device *phydev)
>> +{
>> +       struct adin_priv *priv = phydev->priv;
>> +       int ret;
>> +
>> +       if (phydev->autoneg == AUTONEG_DISABLE) {
>> +               ret = genphy_c45_pma_setup_forced(phydev);
>> +               if (ret < 0)
>> +                       return ret;
>> +
>> +               if (priv->tx_level_prop_present && priv->tx_level_2v4) {
>> +                       ret = phy_set_bits_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_B10L_PMA_CTRL,
>> +                                              MDIO_PMA_10T1L_CTRL_2V4_EN);
>> +                       if (ret < 0)
>> +                               return ret;
>> +               } else {
>> +                       ret = phy_clear_bits_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_B10L_PMA_CTRL,
>> +                                                MDIO_PMA_10T1L_CTRL_2V4_EN);
>> +                       if (ret < 0)
>> +                               return ret;
>> +               }
move below out if/else

if(ret < 0)
	return ret;


>> +static int adin_set_powerdown_mode(struct phy_device *phydev, bool en)
>> +{
>> +       int ret;
>> +       int val;
>> +
>> +       if (en)
>> +               val = ADIN_CRSM_SFT_PD_CNTRL_EN;
>> +       else
>> +               val = 0;please consider below change which looks neat
            val = en? ADIN_CRSM_SFT_PD_CNTRL_EN : 0


Best regards,
Furong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ