From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753320AbcFJMOo (ORCPT ); Fri, 10 Jun 2016 08:14:44 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:33360 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbcFJMOm (ORCPT ); Fri, 10 Jun 2016 08:14:42 -0400 Subject: Re: [PATCH] of: irq: don't return 0 from of_irq_get() To: Rob Herring References: <20938812.efaALfQEUn@wasted.cogentembedded.com> <20160603121432.GB8472@rob-hp-laptop> Cc: grant.likely@linaro.org, devicetree@vger.kernel.org, frowand.list@gmail.com, linux-kernel@vger.kernel.org From: Sergei Shtylyov Message-ID: <65e9eb00-ba9a-87c5-1410-8a5da6b42c8f@cogentembedded.com> Date: Fri, 10 Jun 2016 15:14:40 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160603121432.GB8472@rob-hp-laptop> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/3/2016 3:14 PM, Rob Herring wrote: >> of_irq_get() returns 0 iff irq_create_of_mapping() call fails. Returning >> both error code and 0 on failure is a sign of a misdesigned API. Return >> -ENXIO instead like one of the callers, platform_get_irq(), does; fix up >> the kernel-doc as well... >> >> Signed-off-by: Sergei Shtylyov > > So I think this is done this way because of the variation in NO_IRQ > definition across architectures. I remember that NO_IRQ is "considered harmful" by Linus. Actually, I'm nit sure what you mean, could you elaborate on that? > But then again, of_irq_get is > relatively new. > Rob MBR, Sergei