linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Eric Miao <eric.y.miao@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: mmp: replace NO_IRQ
Date: Tue,  6 Sep 2016 16:07:56 +0200	[thread overview]
Message-ID: <20160906140808.2883875-1-arnd@arndb.de> (raw)

The mmp platform has its own definitions with the old NO_IRQ meaning,
but compares against the global NO_IRQ macro that we should have
removed long ago.

The specific usage in arch/arm/mach-mmp/devices.c is awkward, but
fixing it properly would require a larger scale rewrite of the entire
file, or even using devicetree for all machines. As I'm not able to
do that any time soon, let's make the current behavior more explit
instead and avoid the literal use of NO_IRQ.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-mmp/devices.c | 2 +-
 arch/arm/mach-mmp/irqs.h    | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c
index 671c7a09ab3d..d0cd9687d6b2 100644
--- a/arch/arm/mach-mmp/devices.c
+++ b/arch/arm/mach-mmp/devices.c
@@ -39,7 +39,7 @@ int __init pxa_register_device(struct pxa_device_desc *desc,
 		nres++;
 	}
 
-	if (desc->irq != NO_IRQ) {
+	if (desc->irq != IRQ_MMP_NONE) {
 		res[nres].start	= desc->irq;
 		res[nres].end	= desc->irq;
 		res[nres].flags	= IORESOURCE_IRQ;
diff --git a/arch/arm/mach-mmp/irqs.h b/arch/arm/mach-mmp/irqs.h
index fb492a50a817..4f9f27ae4dbc 100644
--- a/arch/arm/mach-mmp/irqs.h
+++ b/arch/arm/mach-mmp/irqs.h
@@ -1,10 +1,12 @@
 #ifndef __ASM_MACH_IRQS_H
 #define __ASM_MACH_IRQS_H
 
+#define IRQ_MMP_NONE			(-1)
+
 /*
  * Interrupt numbers for PXA168
  */
-#define IRQ_PXA168_NONE			(-1)
+#define IRQ_PXA168_NONE			IRQ_MMP_NONE
 #define IRQ_PXA168_SSP4			0
 #define IRQ_PXA168_SSP3			1
 #define IRQ_PXA168_SSP2			2
@@ -54,7 +56,7 @@
 /*
  * Interrupt numbers for PXA910
  */
-#define IRQ_PXA910_NONE			(-1)
+#define IRQ_PXA910_NONE			IRQ_MMP_NONE
 #define IRQ_PXA910_AIRQ			0
 #define IRQ_PXA910_SSP3			1
 #define IRQ_PXA910_SSP2			2
@@ -116,7 +118,7 @@
 /*
  * Interrupt numbers for MMP2
  */
-#define IRQ_MMP2_NONE			(-1)
+#define IRQ_MMP2_NONE			IRQ_MMP_NONE
 #define IRQ_MMP2_SSP1			0
 #define IRQ_MMP2_SSP2			1
 #define IRQ_MMP2_SSPA1			2
-- 
2.9.0

             reply	other threads:[~2016-09-06 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 14:07 Arnd Bergmann [this message]
2016-09-06 14:24 ` [PATCH] ARM: mmp: replace NO_IRQ Russell King - ARM Linux
2016-09-06 19:28   ` Arnd Bergmann
2016-09-06 19:44     ` Russell King - ARM Linux
2016-09-06 20:03       ` Linus Torvalds
2016-09-06 21:22         ` Russell King - ARM Linux
2016-09-08 20:16           ` Arnd Bergmann
2016-09-06 20:19       ` Arnd Bergmann
2016-09-06 20:41         ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160906140808.2883875-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).