Thread (36 messages) 36 messages, 4 authors, 2021-02-12

Re: [PATCH v13 net-next 04/15] net: mvpp2: always compare hw-version vs MVPP21

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2021-02-11 11:39:46
Also in: linux-arm-kernel, linux-devicetree, lkml

On Thu, Feb 11, 2021 at 12:48:51PM +0200, stefanc@marvell.com wrote:
quoted hunk ↗ jump to hunk
@@ -1199,7 +1199,7 @@ static bool mvpp2_port_supports_xlg(struct mvpp2_port *port)
 
 static bool mvpp2_port_supports_rgmii(struct mvpp2_port *port)
 {
-	return !(port->priv->hw_version == MVPP22 && port->gop_id == 0);
+	return !(port->priv->hw_version != MVPP21 && port->gop_id == 0);
I'm still very much of the opinion (as raised several revisions back)
that using > MVPP21 or >= MVPP22 would be a lot better - especially
when we have situations like this. Having negatives within negatives
does not help readability.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help