From patchwork Tue Sep 6 14:07:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9317071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DCE3360752 for ; Tue, 6 Sep 2016 14:09:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBAAB28A33 for ; Tue, 6 Sep 2016 14:09:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF59628B61; Tue, 6 Sep 2016 14:09:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A01628A33 for ; Tue, 6 Sep 2016 14:09:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhH2j-0001NR-Ro; Tue, 06 Sep 2016 14:08:05 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhH2a-00017B-FN for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2016 14:08:01 +0000 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MDHpc-1brDBp1Grk-00GZqn; Tue, 06 Sep 2016 16:07:33 +0200 From: Arnd Bergmann To: Eric Miao , Haojian Zhuang Subject: [PATCH] ARM: mmp: replace NO_IRQ Date: Tue, 6 Sep 2016 16:07:56 +0200 Message-Id: <20160906140808.2883875-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:VGBvluEElHNS8wOJN1f8AKZ0s5dSdwwhB5aA6ujnK6OUDv8q/IB MUu8zFi9raPDf+Zh3fefzWvsfHDr0xqc7HheJTDyJf/yX5gF8OSOaXUMlEuUBLsDLaF16S1 aWSde+Tvb1uCQYBOOBOqkC7gz8h+Q07LmxDeh6QT+IY0oAjZvStbs+seFUqNizM/WB+xYhw ZiGEh5LWFqSfrvgHPQeVA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Zo3XUztALBo=:0qVgpQqvOyV2AoK0VWzSiX Qj6aNCkhQqleOgbuV9EeAKe9dOuJAb24nSbY35jzyQpXHrL7QWd6OuU+KT7dvQdyeBJxnTpfx 2lDL1jRrXfwdXKs93MEVQq/t8WxQ6limW73dV1WR56l0+VjgJ4EMUlmGpTeDbO8GHgWMQ331i LB5g0gdgOTBN4lgauSVvMEkmNDVKm0N+mOFnQ2NLcSDdRikjbftUx7K92k1TjojW51iCtg9jx WWWoDLvmTRbiNGmpX9oxOKPRM/B7CQh8KpVl+TGZQ7NZNd6VavlkmA91WuExgDHCiUyhTPnR+ PX6+QzCrhZe169xYXJ7Mls50/RhWV6NLcXZ5k5eIuKGUuIQxI1gY8MULelPcq5xKNnzOpZsfn gkjUfnbRlZwdCi7/HBW85UrtYroE8FZPAsC3J2iAdtG+uoLc1w+rJkTgusa2Vkb2DfCqQZ/p+ itJBuBsHwIhdUxNRAR0SXwZ0V1/c4nC8z3dMyH4ZmOLirfo+HWqY97KoGRI/AGvNNZuwYa6Ax Daj0tX71gf8VpRBKRDQuGwOQVJsSimFJKGd2Rak4XaQUokcc+/j71hgD3Z2PBltXFEU/clr/I dYMBq7V4AVnR5mB6QvTXMsqyOfhuBrB5+itqPJbm2IsQ4xwffgtpy/Fm7ZlRDBHY+lhc09ZBe X/T5doZ3uv2074guQFyMV595WRhTleziVJMDkhS5qO10Usp3B0u+1iMN3LjOs+BvgiKk= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160906_070756_946994_676F8789 X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Russell King , Arnd Bergmann , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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