From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762623AbcALOJi (ORCPT ); Tue, 12 Jan 2016 09:09:38 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:46317 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762295AbcALOJf (ORCPT ); Tue, 12 Jan 2016 09:09:35 -0500 Date: Tue, 12 Jan 2016 15:09:30 +0100 From: Andrew Lunn To: Dan Carpenter Cc: Florian Fainelli , Rob Herring , Frank Rowand , Grant Likely , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch 1/2 -next] mdio: remove an unneed condition Message-ID: <20160112140930.GB5527@lunn.ch> References: <20160112093534.GE29804@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160112093534.GE29804@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 For both patches: Reviewd-by: Andrew Lunn 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"))