From patchwork Thu Sep 24 07:17:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 313448 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp1117343ilg; Thu, 24 Sep 2020 00:19:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJPWng5ZKh+xjzIe3DmtDTAMWEglmCZzicTw5AeCmm5x1TTyYM7mVY5sR+BKAqga4eyyks X-Received: by 2002:a17:906:fa81:: with SMTP id lt1mr3135854ejb.459.1600931979697; Thu, 24 Sep 2020 00:19:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600931979; cv=none; d=google.com; s=arc-20160816; b=D87yNC/9Yg+vQZGskyZV3pZDN1HQA4Gesqdwui0SL69t7ONMsu/XzQaoxGzMoHxTnt IDXIx3298WxhVxFlBdtrdbEGuvNaOuZSmTirYCCyhcHg1BFHtc6j1LVkrSb+77cEOYSA aUThZHT6y7BL4cJfXNcSo+k773pFYFa6jSy9Bq1fRnkcGh5eqW81KRbSbpdGQRhJnehB dDRUk+SY1GIYTmm34L9u68/U4VlYPfnYb1h4A9wCEpdcP+f5ouZcknzlFO8sRy58dxxS nB7P+XtOd1m+ZGnXaINHbMzFa2RKHbW9PqmtKZjeC+9K+/guhUfiq9/85ixBCjUz3hPx mVnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XM3e5S5YjUUHiZd0qTy4Kqbz6+SzTvPbvQicxdyvzlA=; b=lAW+hadwAlQ2X+h+F0u62TopFP6A5jMDLD3Fxnk5utmfbbfZPcmZOpl7I5+aPLr1UA p3Jsrp9sdrfsLRO2KKERmdLv01PZfphNPKj2yO01hCApJ5gfZrFAiW0b60kbFZMx/hBX LGi0/Px6v/qnLDccN7dVDRYgGyIwSP9qakm7666340O4Jp0QmAvdzIx5YMdw8qGPL0HV p8eJOrQXdXReD6mFDqtjFc7OBNT/Zxao2zXk97yf5opK3YQkA6uP1J6dj1+UXwQs8yoh bXaQ4zrel6P/M2zEaWmblaAXAkyuY/FVXf0EyM9mw9XvFSnV6ztZfeQ/+TZ4E056vgGx lI1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si1394050ejx.272.2020.09.24.00.19.39; Thu, 24 Sep 2020 00:19:39 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727160AbgIXHTf (ORCPT + 6 others); Thu, 24 Sep 2020 03:19:35 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:45512 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727054AbgIXHTf (ORCPT ); Thu, 24 Sep 2020 03:19:35 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id BFA6150DC3FAB62E2252; Thu, 24 Sep 2020 15:19:32 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.253) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 24 Sep 2020 15:19:26 +0800 From: Zhen Lei To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , "Alexey Brodkin" , Vineet Gupta , devicetree , linux-snps-arc , linux-kernel CC: Zhen Lei , Sebastian Hesselbarth , Haoyu Lv , Libin , Kefeng Wang Subject: [PATCH v6 1/6] genirq: define an empty function set_handle_irq() if !GENERIC_IRQ_MULTI_HANDLER Date: Thu, 24 Sep 2020 15:17:49 +0800 Message-ID: <20200924071754.4509-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20200924071754.4509-1-thunder.leizhen@huawei.com> References: <20200924071754.4509-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.177.253] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org To avoid compilation error if an irqchip driver references the function set_handle_irq() but may not select GENERIC_IRQ_MULTI_HANDLER on some systems. For example, the Synopsys DesignWare APB interrupt controller (dw_apb_ictl) is used as the secondary interrupt controller on arc, csky, arm64, and most arm32 SoCs, and it's also used as the primary interrupt controller on Hisilicon SD5203 (an arm32 SoC). The latter need to use set_handle_irq() to register the top-level IRQ handler, but this multi irq handler registration mechanism is not implemented on arc system. The input parameter "handle_irq" maybe defined as static and only set_handle_irq() references it. This will trigger "defined but not used" warning. So add "(void)handle_irq" to suppress it. Signed-off-by: Zhen Lei --- include/linux/irq.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.8.3 diff --git a/include/linux/irq.h b/include/linux/irq.h index 1b7f4dfee35b397..b167baef88c0b43 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -1252,6 +1252,12 @@ void irq_matrix_free(struct irq_matrix *m, unsigned int cpu, * top-level IRQ handler. */ extern void (*handle_arch_irq)(struct pt_regs *) __ro_after_init; +#else +#define set_handle_irq(handle_irq) \ + do { \ + (void)handle_irq; \ + WARN_ON(1); \ + } while (0) #endif #endif /* _LINUX_IRQ_H */