From patchwork Tue Sep 15 08:43:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 303981 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp2338177ilg; Tue, 15 Sep 2020 01:43:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/aSwoN3QMvO/x+l2j/ad9Dwqzmy/f1QhgXsFdUb2gJzSBHU4ACOW2T/YxlTEkLHdPc4s2 X-Received: by 2002:a17:906:7cc6:: with SMTP id h6mr18890050ejp.266.1600159428988; Tue, 15 Sep 2020 01:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600159428; cv=none; d=google.com; s=arc-20160816; b=apLY0vyZqD9wn1vZ5ZIoZhAwKiUs6NvJSKFy4C+hMIAk3V+/XtRuwCVyqOfdTNn8AW 3oBC5K6htnS5u1SypSFSa/2gUqqalKNgXfdpfNrPskpLhGGgpeUPRyp6X+aEqOf2u0bD L7wJbOagaQTA9XyycNp6oTqu0apMCf0RSx1jAKG9w/ava8vZQCwjEci31niu+1XDMrnp EdErFPhftXMdwDJGPCj5Uq9JsFAg5KRPAbalTvPewOheahfC3u3Fh7eDLU/rBWu8Bii+ GddQSWPm/fI7OeinQQUNmuzKe9v16buvWlmW21rvQ77G9mMCv9X/6MME6T9S4LYelUly VYCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RncGnlpGtNs0WlTRC29Y9GSx5wIGyqkem6ZQbLPSuA4=; b=B83Q+0qaubqrBCJ16gNMAmbiwJ0jeP2renrUxtEwp3UoxFiXOafrVzZOXI/znJr4tg Q/S+6s1Ner1KPB5V/9bFPMuT699cGrG2/XfoWeJx2R8aDgyw0cXPSaggQGUqSEsartcO pZzibtAPu2nYjVnF8RMc+HljluVMzOkJ1L5jmZvso0TxkMdbwejvUZKZdPtfOdunaNHM 4on7RHhp73HOu8xGVggAJaesTou7wrL48Xu/+u5HnTCKQslOVyURUOqx5h52dXctCX1P Ad2P3tvRRQZG6lk7V5mKWVr76vTCTlnrJMJZxG7iaYZFftSpUShgXbDbzrtON/mwMtD5 vSHQ== 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 v5si9170345edr.49.2020.09.15.01.43.48; Tue, 15 Sep 2020 01:43:48 -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 S1726402AbgIOIns (ORCPT + 6 others); Tue, 15 Sep 2020 04:43:48 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56584 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726087AbgIOInm (ORCPT ); Tue, 15 Sep 2020 04:43:42 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 70B9E5729C63E5573513; Tue, 15 Sep 2020 16:43:40 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.253) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Tue, 15 Sep 2020 16:43:30 +0800 From: Zhen Lei To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Guo Ren , devicetree , linux-csky , linux-kernel CC: Zhen Lei , Sebastian Hesselbarth , Haoyu Lv , Libin , Kefeng Wang , "Jianguo Chen" Subject: [PATCH v4 1/4] genirq: define an empty function set_handle_irq() if !GENERIC_IRQ_MULTI_HANDLER Date: Tue, 15 Sep 2020 16:43:02 +0800 Message-ID: <20200915084305.3085-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20200915084305.3085-1-thunder.leizhen@huawei.com> References: <20200915084305.3085-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.177.253] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org 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 | 2 ++ 1 file changed, 2 insertions(+) -- 1.8.3 diff --git a/include/linux/irq.h b/include/linux/irq.h index 1b7f4dfee35b397..0848a2aaa9b40b1 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -1252,6 +1252,8 @@ 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; } while (0) #endif #endif /* _LINUX_IRQ_H */