From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751579AbdHXK0d (ORCPT ); Thu, 24 Aug 2017 06:26:33 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34422 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbdHXK0c (ORCPT ); Thu, 24 Aug 2017 06:26:32 -0400 From: Bhumika Goyal To: julia.lawall@lip6.fr, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] irqchip: mmp: make mmp_intc_conf const Date: Thu, 24 Aug 2017 15:56:21 +0530 Message-Id: <1503570381-8541-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make these const as they are only used during a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct mmp_intc_conf s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ position ref.p; identifier match.s,f,c; expression e; @@ ( e = s@p | e = s@p.f | c(...,s@p.f,...) | c(...,s@p,...) ) @bad depends on !good1@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct mmp_intc_conf s; Signed-off-by: Bhumika Goyal --- drivers/irqchip/irq-mmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c index 013fc96..25f32e1 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -181,13 +181,13 @@ static int mmp_irq_domain_xlate(struct irq_domain *d, struct device_node *node, .xlate = mmp_irq_domain_xlate, }; -static struct mmp_intc_conf mmp_conf = { +static const struct mmp_intc_conf mmp_conf = { .conf_enable = 0x51, .conf_disable = 0x0, .conf_mask = 0x7f, }; -static struct mmp_intc_conf mmp2_conf = { +static const struct mmp_intc_conf mmp2_conf = { .conf_enable = 0x20, .conf_disable = 0x0, .conf_mask = 0x7f, -- 1.9.1