From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753217AbbBMQIu (ORCPT ); Fri, 13 Feb 2015 11:08:50 -0500 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:18450 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752823AbbBMQIr (ORCPT ); Fri, 13 Feb 2015 11:08:47 -0500 X-ME-Helo: beldin X-ME-Date: Fri, 13 Feb 2015 17:08:46 +0100 X-ME-IP: 109.220.218.8 From: Robert Jarzmik To: Linus Walleij Cc: Nicolas Pitre , "David S. Miller" , "netdev\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH] Revert "smc91x: retrieve IRQ and trigger flags in a modern way" In-Reply-To: (Linus Walleij's message of "Fri, 13 Feb 2015 10:16:09 +0800") References: <1423760350-20149-1-git-send-email-robert.jarzmik@free.fr> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.92 (gnu/linux) X-URL: http://belgarath.falguerolles.org/ Date: Fri, 13 Feb 2015 17:08:40 +0100 Message-ID: <87a90h6bg7.fsf@free.fr> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Walleij writes: > On Fri, Feb 13, 2015 at 12:59 AM, Robert Jarzmik wrote: > > But isn't the real problem that in the device tree case, > irq_get_irq_data(ndev->irq) will work becaus parsing an interrupt > from the device tree populates it correctly in platform_get_irq() > whereas for the legacy lookup it just fetches the number. > > So to me it seems like a weakness in the platform_get_irq() > helper altogether. > > Does the following work? (I can send as a separate patch for > testing if you like). Almost. If you replace : > + if (r->flags & IORESOURCE_BITS) with: > + if (r && (r->flags & IORESOURCE_BITS)) Then you can push a patch with my: Tested-by: Robert Jarzmik Now if you can make it in -rc2 or -rc3, this revert should be forgotten. But if you can't make it for 3.20, I'll push for the revert. So I think it's up to you now, and let's see what Gregh says about it. Cheers. -- Robert