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:	Tue, 19 Jan 2016 16:25:03 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	Teresa Remmet <t.remmet@...tec.de>
Cc:	netdev@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>,
	linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v2] net: phy: smsc: Fix disabling energy detect mode

> +struct smsc_phy_priv {
> +	bool energy_enable:1;
> +};

Time to show my ignorance of bitfields. Since this is a bool, does the
:1 actually do anything?

> +static int smsc_phy_probe(struct phy_device *phydev)
> +{
> +	struct device *dev = &phydev->mdio.dev;
> +	struct device_node *of_node __maybe_unused = dev->of_node;
> +	struct smsc_phy_priv *priv;
> +	int __maybe_unused len;
> +
> +	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> +	if (!priv)
> +		return -ENOMEM;
> +
> +	if (of_find_property(of_node, "smsc,disable-energy-detect", &len))
> +		priv->energy_enable = false;

Here you set it to false. Where does it get set to true?

Also, of_property_read_bool() would be a better call than of_find_property.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ