From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-x231.google.com (mail-pb0-x231.google.com [IPv6:2607:f8b0:400e:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id BD5E52C0087 for ; Fri, 23 Aug 2013 23:22:54 +1000 (EST) Received: by mail-pb0-f49.google.com with SMTP id xb4so665536pbc.8 for ; Fri, 23 Aug 2013 06:22:51 -0700 (PDT) MIME-Version: 1.0 Sender: geert.uytterhoeven@gmail.com In-Reply-To: References: <1326313337-24603-1-git-send-email-grant.likely@secretlab.ca> <1326313337-24603-12-git-send-email-grant.likely@secretlab.ca> Date: Fri, 23 Aug 2013 15:22:51 +0200 Message-ID: Subject: Re: [RFC 11/14] powerpc: Eliminate NO_IRQ usage From: Geert Uytterhoeven To: Grant Likely Content-Type: text/plain; charset=UTF-8 Cc: Linux-Arch , Stephen Rothwell , Russell King , linux-s390 , "linux-kernel@vger.kernel.org" , Rob Herring , Linux-Next , Thomas Gleixner , "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Aug 23, 2013 at 3:18 PM, Geert Uytterhoeven wrote: > On Fri, Jul 26, 2013 at 5:56 AM, Grant Likely wrote: >> On Thu, Jul 25, 2013 at 3:58 PM, Geert Uytterhoeven >> wrote: >>> On Wed, Jan 11, 2012 at 9:22 PM, Grant Likely wrote: >>>> NO_IRQ is evil. Stop using it in arch/powerpc and powerpc device drivers >>> >>>> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c >>>> index 3e06696..55c6ff9 100644 >>>> --- a/sound/soc/fsl/fsl_ssi.c >>>> +++ b/sound/soc/fsl/fsl_ssi.c >>>> @@ -666,7 +666,7 @@ static int __devinit fsl_ssi_probe(struct platform_device *pdev) >>>> ssi_private->ssi_phys = res.start; >>>> >>>> ssi_private->irq = irq_of_parse_and_map(np, 0); >>>> - if (ssi_private->irq == NO_IRQ) { >>>> + if (!ssi_private->irq) { >>>> dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); >>>> ret = -ENXIO; >>>> goto error_iomap; >>> >>> What's the plan with this patch? >>> >>> This is now failing on xtensa, as it's one of the architectures that doesn't >>> define NO_IRQ. Only arm, c6x, mn10300, openrisc, parisc, powerpc, and sparc >>> define it. >> >> Wow. I'd pretty much dropped that patch because I didn't have time to >> chase it down. It should be pursued though. >> >> In that particular case it is safe I think to apply the change. PPC >> defines NO_IRQ to be 0 anyway. > > Note that we still have arches that define it as nonzero: > > arch/arm/include/asm/irq.h:#define NO_IRQ ((unsigned int)(-1)) > arch/mn10300/include/asm/irq.h:#define NO_IRQ INT_MAX > arch/openrisc/include/asm/irq.h:#define NO_IRQ (-1) > arch/parisc/include/asm/irq.h:#define NO_IRQ (-1) > arch/sparc/include/asm/irq_32.h:#define NO_IRQ 0xffffffff > arch/sparc/include/asm/irq_64.h:#define NO_IRQ 0xffffffff > > Only c6x and powerpc use zero, and thus are ready to drop NO_IRQ. s390 just gained "NO_IRQ support" in -next, in commit e15a9dcfdec29786d1830c5b7beaf02a288a89e1 ("s390: convert interrupt handling to use generic hardirq"): /* This number is used when no interrupt has been assigned */ #define NO_IRQ 0 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds