[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZV3NAPB/MX3R4b2q@shell.armlinux.org.uk>
Date: Wed, 22 Nov 2023 09:42:24 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>, Andrew Lunn <andrew@...n.ch>,
Eric Dumazet <edumazet@...gle.com>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Vladimir Oltean <olteanv@...il.com>,
Woojung Huh <woojung.huh@...rochip.com>,
Arun Ramadoss <arun.ramadoss@...rochip.com>,
Simon Horman <simon.horman@...igine.com>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net-next v5 2/3] net: dsa: microchip: ksz8: Add function
to configure ports with integrated PHYs
On Wed, Nov 22, 2023 at 10:25:44AM +0100, Oleksij Rempel wrote:
> + if (duplex) {
Unnecessary.
> + bool aneg_en = false;
> +
> + ret = ksz_pread8(dev, port, regs[P_FORCE_CTRL], &ctrl);
> + if (ret)
> + return;
> +
> + if (ksz_is_ksz88x3(dev)) {
> + if ((ctrl & PORT_AUTO_NEG_ENABLE))
Too many parens.
> + aneg_en = true;
Simpler:
aneg_en = ctrl & PORT_AUTO_NEG_ENABLE;
> + } else {
> + if (!(ctrl & PORT_AUTO_NEG_DISABLE))
> + aneg_en = true;
Simpler:
aneg_en = !(ctrl & PORT_AUTO_NEG_DISABLE);
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists