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, 12 Jan 2016 15:09:30 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Florian Fainelli <f.fainelli@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Frank Rowand <frowand.list@...il.com>,
	Grant Likely <grant.likely@...aro.org>, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch 1/2 -next] mdio: remove an unneed condition

On Tue, Jan 12, 2016 at 12:35:34PM +0300, Dan Carpenter wrote:
> It used to be that mdio->irq was a pointer but after e7f4dc3536a4
> ('mdio: Move allocation of interrupts into core') it's an array inside
> the mdio struct so it can never be NULL.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

For both patches:

Reviewd-by: Andrew Lunn <andrew@...n.ch>

Thanks
	Andrew

> 
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index c0a8f84..86829f8 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -62,11 +62,9 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
>  	rc = irq_of_parse_and_map(child, 0);
>  	if (rc > 0) {
>  		phy->irq = rc;
> -		if (mdio->irq)
> -			mdio->irq[addr] = rc;
> +		mdio->irq[addr] = rc;
>  	} else {
> -		if (mdio->irq)
> -			phy->irq = mdio->irq[addr];
> +		phy->irq = mdio->irq[addr];
>  	}
>  
>  	if (of_property_read_bool(child, "broken-turn-around"))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ