From patchwork Fri Sep 18 11:21:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 313181 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp1225478ilg; Fri, 18 Sep 2020 04:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA6SmSg6fjgsHuGZ09cxV57WYswQhoWE32pQCy3UpPaqpdEDQzkFJm/swJTowCa2S9D8sh X-Received: by 2002:a50:ce06:: with SMTP id y6mr38670302edi.273.1600428202404; Fri, 18 Sep 2020 04:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600428202; cv=none; d=google.com; s=arc-20160816; b=QDLHwnNyvosHRYx4Ct6j98ine47T9QgrVt2SSFQsfhrh0Ywa2OtXHiC7jDjj0bpOky z2Ksnz9LGqjgR6YNLd+PdpoEhzCm0ORm5WtyXP4RZ7fWOzbE8JAW/xbMIbu1Gi7GDBRb vuKxGq2PoEb2A9MpbsQsKBVwgNNYYF7Y2qOPFMCD+TZu9Uzj3Z8t6fJa8kXdoNtyN5xu s0aiVntvxube/1jc8gg0euqnUZIbJ8dYSoaJwm9Lv8f/N89qachVa4laqglKSpZHqQhj KBuSbhYvdxN1muNkQFeiwKtn892NHuR1O0uHr7GKqzl80nj7B/PTkHNplMzYdAQe01Ov LD+A== 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=XX8FyvoqIx6fjA9j5RY4vHho2nI7s5/xIkIrKQDRZOv0RnLldZAvgIj6Auy1akOzsX hGcAT90PbDH+7WuMOqHolAQAWqnupkulxywQHCfVWvDR8jgHrdLqLxSw/kGTqumaYVYe yKfraxXAmhDsPqhGT9tgD1xOE8HfLpvF/fR3zlYDhf7eC7JQbXhNje1SiHYy5z1JRTcG RQoefhLom1Dj6EHyYofLzYzmnzcpdg/7H7HaP2laOqQJ3ZLZxEePjkfUJuQURU0TW6yf doADtm3TAeib+XnYrqnNQksocqI8m9Mkohuan5bs0CmCfuFr5Qhq1DAT5bcjKRqkQwEl 9z0A== 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 en9si2025344ejb.220.2020.09.18.04.23.22; Fri, 18 Sep 2020 04:23:22 -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 S1726422AbgIRLW7 (ORCPT + 6 others); Fri, 18 Sep 2020 07:22:59 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33904 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725941AbgIRLWz (ORCPT ); Fri, 18 Sep 2020 07:22:55 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 191923A6D08B770DF102; Fri, 18 Sep 2020 19:22:52 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.253) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 19:22:45 +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 v5 1/6] genirq: define an empty function set_handle_irq() if !GENERIC_IRQ_MULTI_HANDLER Date: Fri, 18 Sep 2020 19:21:57 +0800 Message-ID: <20200918112202.3418-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20200918112202.3418-1-thunder.leizhen@huawei.com> References: <20200918112202.3418-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 */