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: 101841 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp568494qgf; Tue, 6 Sep 2016 07:08:10 -0700 (PDT) X-Received: by 10.67.22.39 with SMTP id hp7mr63707674pad.19.1473170890277; Tue, 06 Sep 2016 07:08:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si8098176pfd.97.2016.09.06.07.08.09; Tue, 06 Sep 2016 07:08:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756528AbcIFOIG (ORCPT + 27 others); Tue, 6 Sep 2016 10:08:06 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:56068 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755989AbcIFOIE (ORCPT ); Tue, 6 Sep 2016 10:08:04 -0400 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 Cc: Arnd Bergmann , Russell King , 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 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= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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