]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: use != rather than ^ for comparing dev_id
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 29 Oct 2025 00:03:41 +0000 (00:03 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Oct 2025 00:18:22 +0000 (17:18 -0700)
Use the more usual not-equals rather than exclusive-or operator when
comparing the dev_id in stmmac_hwif_find().

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vDtfB-0000000CCCR-25rr@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/hwif.c

index 892cef79c4d10cce61fb96c52175efac22d09b78..e1f99b9d9d7f13c4d8b4a4c08d8037ab8350cebb 100644 (file)
@@ -314,7 +314,7 @@ stmmac_hwif_find(enum dwmac_core_type core_type, u8 snpsver, u8 dev_id)
                if (snpsver < entry->min_id)
                        continue;
                if (core_type == DWMAC_CORE_XGMAC &&
-                   (dev_id ^ entry->dev_id))
+                   dev_id != entry->dev_id)
                        continue;
 
                return entry;