From patchwork Tue Jun 6 05:59:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 9768047 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 4C1306035D for ; Tue, 6 Jun 2017 06:00:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4136328437 for ; Tue, 6 Jun 2017 06:00:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 364192847C; Tue, 6 Jun 2017 06:00:28 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B2EE928455 for ; Tue, 6 Jun 2017 06:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=sPpMxdfE5VMklDvw1kyiyZjzwUWTS2tHGyWBNhvMxVs=; b=rDWpBCPJKzhqW7da+z4CNz3Tgh 5YQBm3/+F2apJrTuhcWYBLVJwseqUg2eQJ9ThiSGLjS+y9XYiyZixduHlTMZuNvNfSrlAQi3BbOOI JN9DtW4a89++lLT9Ogb0vIIZbLMg1HdwGIMQ/7tgdtHBgtbUV5N5K2dnOjIu6Z75dzDN+VBrjdzKY GO9jA3bAlzenlYjYzypo6J+StoVGx/Dsybh0IYbcgQxa9Lz9qhS7uOZZIbbNi3ipnEXY4fFhxw4sC A67xT2asJWnxmPoSsGwwj7ZodAjqnLsItcXx8DMAY6U9x+H67CkKQ4YKgaPSg5TRact3ISVzQkOJR 9eNDIxRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dI7XV-0001ZB-Oq; Tue, 06 Jun 2017 06:00:25 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dI7XA-0008Pp-Iz for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2017 06:00:08 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id E0C365FFD9; Tue, 6 Jun 2017 13:59:36 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland Subject: [PATCH 04/10] irqchip: sunxi-nmi: const-ify sunxi_sc_nmi_reg_offs structures Date: Tue, 6 Jun 2017 13:59:26 +0800 Message-Id: <20170606055932.22548-5-wens@csie.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606055932.22548-1-wens@csie.org> References: <20170606055932.22548-1-wens@csie.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170605_230004_842533_20F815EC X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 sunxi_sc_nmi_reg_offs, which hold the register offsets for the various variants, is never modified, and only used at init time within the init functions referenced by IRQCHIP_DECLARE, which themselves are tagged __init. Const-ify the sunxi_sc_nmi_reg_offs structures, and tag them as __initconst. Signed-off-by: Chen-Yu Tsai --- drivers/irqchip/irq-sunxi-nmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c index 76f2431b6b7b..e713ec66322b 100644 --- a/drivers/irqchip/irq-sunxi-nmi.c +++ b/drivers/irqchip/irq-sunxi-nmi.c @@ -52,19 +52,19 @@ struct sunxi_sc_nmi_reg_offs { u32 enable; }; -static struct sunxi_sc_nmi_reg_offs sun6i_reg_offs = { +static const struct sunxi_sc_nmi_reg_offs sun6i_reg_offs __initconst = { .ctrl = SUN6I_NMI_CTRL, .pend = SUN6I_NMI_PENDING, .enable = SUN6I_NMI_ENABLE, }; -static struct sunxi_sc_nmi_reg_offs sun7i_reg_offs = { +static const struct sunxi_sc_nmi_reg_offs sun7i_reg_offs __initconst = { .ctrl = SUN7I_NMI_CTRL, .pend = SUN7I_NMI_PENDING, .enable = SUN7I_NMI_ENABLE, }; -static struct sunxi_sc_nmi_reg_offs sun9i_reg_offs = { +static const struct sunxi_sc_nmi_reg_offs sun9i_reg_offs __initconst = { .ctrl = SUN9I_NMI_CTRL, .pend = SUN9I_NMI_PENDING, .enable = SUN9I_NMI_ENABLE, @@ -142,7 +142,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type) } static int __init sunxi_sc_nmi_irq_init(struct device_node *node, - struct sunxi_sc_nmi_reg_offs *reg_offs) + const struct sunxi_sc_nmi_reg_offs *reg_offs) { struct irq_domain *domain; struct irq_chip_generic *gc;