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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Dec 2013 14:52:11 -0800
From:	Florian Fainelli <florian@...nwrt.org>
To:	<netdev@...r.kernel.org>
CC:	<davem@...emloft.net>, <grant.likely@...aro.org>,
	<devicetree@...r.kernel.org>, <abrodkin@...opsys.com>,
	<rob.herring@...xeda.com>, <mark.rutland@....com>,
	<sebastian.hesselbarth@...il.com>,
	Florian Fainelli <f.fainelli@...il.com>
Subject: [PATCH 2/7] net: of_mdio: use PHY_MAX_ADDR constant

From: Florian Fainelli <f.fainelli@...il.com>

Use the PHY_MAX_ADDR constant for checking if a MDIO bus address is
valid instead of using a plain "32".

Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
 drivers/of/of_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 82485d2..f93ebca 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -107,7 +107,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
 		}
 
 		addr = be32_to_cpup(paddr);
-		if (addr >= 32) {
+		if (addr >= PHY_MAX_ADDR) {
 			dev_err(&mdio->dev, "%s PHY address %i is too large\n",
 				child->full_name, addr);
 			continue;
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ