From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753779AbcBAUzU (ORCPT ); Mon, 1 Feb 2016 15:55:20 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:34940 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932122AbcBAUzT (ORCPT ); Mon, 1 Feb 2016 15:55:19 -0500 Subject: Re: [PATCH] net: smc91x: propagate irq return code To: Robert Jarzmik References: <1454280377-25697-1-git-send-email-robert.jarzmik@free.fr> <56AF514D.6010608@cogentembedded.com> <87twls5fkk.fsf@belgarion.home> Cc: Nicolas Pitre , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <56AFC632.8070507@cogentembedded.com> Date: Mon, 1 Feb 2016 23:55:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <87twls5fkk.fsf@belgarion.home> 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 02/01/2016 11:41 PM, Robert Jarzmik wrote: >>> The smc91x driver doesn't honor the probe deferral mechanism when the >>> interrupt source is not yet available, such as one provided by a gpio >>> controller not probed. >> What if 'ndev->irq' does equal 0? > That's not possible AFAIR. Possible if of_irq_get() returns 0 (and it will on failure!). > There was a discussion where Linus had stated that the irq is a cookie, and a 0 > value is "no interrupt", expcepting for the single case of a PC and its timer > interrupt. I know, I know... and even on x86 it was never passed to request_irq(), only to setup_irq()... > As we're not in that case, and up to my understanding, platform_get_irq() cannot > return a 0 value, only a strictly negative or positive one. Wishful thinking... > And yet, that test now looks weird to me. I think I'll respin the patch with a > "if (ndev->irq < 0) {" instead of the "if (ndev->irq <= 0) {". Defeating Linus' PoV as a result... ;-) > Cheers. MBR, Sergei