From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe.C Subject: Re: [PATCH v3 4/7] ARM: mediatek: Add sysirq interrupt polarity support Date: Thu, 9 Oct 2014 22:53:45 +0800 Message-ID: <1412866425.23455.1.camel@mtksdaap41> References: <1412864980-20273-1-git-send-email-yingjoe.chen@mediatek.com> <1412864980-20273-5-git-send-email-yingjoe.chen@mediatek.com> <2076856.iIXavsNzjc@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2076856.iIXavsNzjc@wuerfel> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Arnd Bergmann Cc: Mark Rutland , Benjamin Herrenschmidt , Sricharan R , Florian Fainelli , Russell King , Pawel Moll , yh.chen@mediatek.com, arm@kernel.org, nathan.chung@mediatek.com, Grant Likely , devicetree@vger.kernel.org, Jason Cooper , yingjoe.chen@gmail.com, Marc Zyngier , Matt Porter , Marc Carino , Rob Herring , Matthias Brugger , Thomas Gleixner , eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org, srv_heupstream@mediatek.com, hc.yen@mediatek.com, linux-kernel@vger.kernel.org, Santosh Shilimkar , Sascha Hauer , Ol List-Id: devicetree@vger.kernel.org On Thu, 2014-10-09 at 16:37 +0200, Arnd Bergmann wrote: > On Thursday 09 October 2014 22:29:37 Joe. C wrote: > > > +static int __init mtk_sysirq_of_init(struct device_node *node, > > + struct device_node *parent) > > +{ > > + struct device_node *parent_node; > > + struct irq_domain *domain, *domain_parent = NULL; > > + struct mt_sysirq_chip_data *chip_data; > > + int ret = 0; > > + > > + parent_node = of_irq_find_parent(node); > > + if (parent_node) { > > + domain_parent = irq_find_host(parent_node); > > + of_node_put(parent_node); > > + } > > Just a small comment: I think the 'parent' argument to the function > already contains the device node you are looking up here, so > no need for the second variable or _find_parent call. > > This means you can also drop the = NULL assignment for the > domain. > > Arnd Thanks for point this out. I'll fix this in the next version. Joe.C