From patchwork Thu Nov 10 15:18:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 124902 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 996FC1007D4 for ; Fri, 11 Nov 2011 02:19:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935125Ab1KJPS6 (ORCPT ); Thu, 10 Nov 2011 10:18:58 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:34664 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933817Ab1KJPS5 (ORCPT ); Thu, 10 Nov 2011 10:18:57 -0500 Received: by wyh15 with SMTP id 15so2809129wyh.19 for ; Thu, 10 Nov 2011 07:18:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5BORzd3IQB5xfWA2/cdcRuySV84f5SdBxhEMCsC0nxg=; b=QSLFIIguQ02FDkn1QVnq/NPhU4fo4ewJ11F6/3Q6QIPZEH9Q4Tu59LuzU06ZATZAdp RI/4r5g4LKk3aArPWtDkx0bhrb6mWli4w6NoBUrMDxaIIEBL9ujlgUSDZIY1j4xNLqba o9XK9hPMLbtinDWB90FxrgR/1oOeC9oQTlXU0= Received: by 10.216.176.14 with SMTP id a14mr6327540wem.14.1320938335857; Thu, 10 Nov 2011 07:18:55 -0800 (PST) Received: from localhost (mail.dev.rtsoft.ru. [213.79.90.226]) by mx.google.com with ESMTPS id ff6sm9898186wbb.10.2011.11.10.07.18.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Nov 2011 07:18:55 -0800 (PST) Date: Thu, 10 Nov 2011 19:18:52 +0400 From: Anton Vorontsov To: Ingo Molnar , Jeff Garzik , Grant Likely Cc: Randy Dunlap , Stephen Rothwell , linux-next@vger.kernel.org, LKML , "linux-ide@vger.kernel.org" , Linus Torvalds , Andrew Morton , devicetree-discuss@lists.ozlabs.org Subject: [PATCH] ata: Fix build error in pata_of_platform (NO_IRQ usage) Message-ID: <20111110151852.GA7465@oksana.dev.rtsoft.ru> References: <20111011201127.455df266dcbffb1d621f8576@canb.auug.org.au> <4E94A920.40503@xenotime.net> <4E987829.3080104@xenotime.net> <20111110135703.GA23609@elte.hu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20111110135703.GA23609@elte.hu> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org This patch makes a band-aid fix the following build failure: CC drivers/ata/pata_of_platform.o drivers/ata/pata_of_platform.c: In function 'pata_of_platform_probe': drivers/ata/pata_of_platform.c:55:13: error: 'NO_IRQ' undeclared (first use in this function) drivers/ata/pata_of_platform.c:55:13: note: each undeclared identifier is reported only once for each function it appears in The proper fix (stop OF code from returning NO_IRQ values) is pending. Signed-off-by: Anton Vorontsov --- On Thu, Nov 10, 2011 at 02:57:03PM +0100, Ingo Molnar wrote: [...] > > > drivers/ata/pata_of_platform.c:55:13: error: 'NO_IRQ' undeclared (first use in this function) > > > > [adding Author: Anton] > > > > Build error still present in linux-next of 20111014. > > This build failure regression report was ignored twice and then > pushed upstream and is still unfixed a month after the initial > report. Upstream now fails to build on like 25% of x86 configs. > > What's going on with this bug guys? Here is the story: - NO_IRQ is evil[1], AFAIR the trend is to remove its usage completely; - Sane arches (x86) don't use it at all, or have it defined to 0 (PPC32/64). - On another arches it is either -1 or whatever random value; - The NO_IRQ disease spreads despite our willingness, even within the new OF code. The new irq domain stuff (that is used on ARM) always returns 0 in 'no irq' case, so we may easily remove it. So the proper fix would be two-fold: for OF and for that driver. But this is for 3.3 kernels. I'll send the two patches as follow-ups. In the meantime, the band-aid (for 3.2) is down below. [1] http://lkml.org/lkml/2005/11/22/159 http://lkml.org/lkml/2005/11/22/227 drivers/ata/pata_of_platform.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index a72ab0d..f99e17b 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c @@ -16,6 +16,11 @@ #include #include +/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */ +#ifndef NO_IRQ +#define NO_IRQ 0 +#endif + static int __devinit pata_of_platform_probe(struct platform_device *ofdev) { int ret;