From patchwork Tue Aug 22 06:25:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9914287 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 6F91F603F9 for ; Tue, 22 Aug 2017 06:27:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DA1228708 for ; Tue, 22 Aug 2017 06:27:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 621B2287EC; Tue, 22 Aug 2017 06:27:14 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=unavailable 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 B0CA828708 for ; Tue, 22 Aug 2017 06:27:13 +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: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:In-Reply-To: References:List-Owner; bh=PGEwVh0Sq+VeWfuAT59s+sj7HqeMv6bzi2+eP0oxLFY=; b=LUa J8qyeC21VePS3/I5q3AVC/E8I6+MlaL4Eyh3Czi5Zeh42DwfUsFDghILcmt84z0QVOIstP3GpoXvk bHbZW6oot2dGzfzq/TOcmmth/qhJ4wdsOdXqjZqBwhlalWtWoBm1NCaROcoW868gHUQrwXDuFqHWN gcSJy2QiDA7bp9O9wHpZW2UtfnkLpZTo/1T1j/jSmuUbwfcOApQx9Gh773Y7Nwzix+0PeYBkp7jrW fp19PA7OGQ/bC/pShSqGrpNnnEIjVwZFPshJJw3k9bHmkmEPEYycz+Yqx3btWHNtvBRGP3XZ+UeYe ONghqDWPSnWo2m9GcMYnyi4pBIryrfg==; 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 1dk2dr-0007n9-V0; Tue, 22 Aug 2017 06:26:23 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk2do-0007DD-08 for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2017 06:26:22 +0000 Received: by mail-pf0-x241.google.com with SMTP id t83so5090445pfj.3 for ; Mon, 21 Aug 2017 23:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=vRZvaL67VZyXwNM+5aJQxWEgvzEXAOvdQAjXeKdnQTo=; b=a+aMeB5hWa94pOuSYk5qx+rVvgVuZyyEPv2FMzNBbsR7qfaEi7SAKGuTVZF0EFhKIV n6qQC3dU7lsk226O9XyfFuqqPVrWVWyAFlegd0w+zKxONdtCFYLYFJtRxBZMcAnyAS0L apxgPJE2HGg7fj2QeT5cUPFy5E73sygqanODZ6ZhXlR93skmWeHPoobxtSDUj3Qw2jMm U+ikakaS/q73AwGc2z/noJdBM3Md07VVYsO3ONXMchJIs4mXLZdSgH01SXxYZSFzERLN Ie+u6yPJNJH5qi9HI6SRBvY5A7vh6I6t2GVZOg0t3GlujBMY1oCNTWu4aYUYOo1bkwXO 9Mhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vRZvaL67VZyXwNM+5aJQxWEgvzEXAOvdQAjXeKdnQTo=; b=r4ulz9cuhSD//6UTcf50jpW4eIIWNGF3VTqLy+1gTQgMu+9iVYkOrtwZ2/nBMhFYsV RIvKsRVwvnPnVbEqa5i7xFiLxL2A24NOJilQ02CFX4nKsVXLhYGHt/MuhYmrqOK9916d Rz34lQD5mKo0sEg/AB6TLTiV05uTh9RLYKyWkX4/pRh0m2LECVccOkbAsTJIZSNhWfni eiyA74qow/wNxONJSFIJi8fxWJm2tY/tFfVx0QDgV4TzQEfUJaYgv02FewGxcJTDhlJN nJSzUICiqzjXqst4PpuH/HbgScFP+ye5puh9L4sVSrjlM4D572wJm4kpewAnBbWqePDC PiBQ== X-Gm-Message-State: AHYfb5iywwjVBW3tEpNWsu3y/rK0iKHYL0a/55Uxnaezr749lvAg19uU vqgJ7FhCQeqMMw== X-Received: by 10.98.14.91 with SMTP id w88mr1324949pfi.306.1503383158512; Mon, 21 Aug 2017 23:25:58 -0700 (PDT) Received: from gmail.com ([117.196.127.182]) by smtp.gmail.com with ESMTPSA id g14sm21929713pfm.77.2017.08.21.23.25.54 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 23:25:57 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 22 Aug 2017 11:55:51 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, aaro.koskinen@iki.fi, tony@atomide.com, linux@armlinux.org.uk, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: omap1: add const and initconst to omap_lcd_config Date: Tue, 22 Aug 2017 11:55:50 +0530 Message-Id: <1503383150-2363-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170821_232620_075073_3485F0D8 X-CRM114-Status: GOOD ( 12.36 ) 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: Bhumika Goyal 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 Make these const as they are only passed to a const argument of the function omapfb_set_lcd_config. Also, replace __initdata with __initconst to avoid section conflict error. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct omap_lcd_config s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ identifier match.s; position ref.p; @@ omapfb_set_lcd_config(&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 omap_lcd_config s; Signed-off-by: Bhumika Goyal --- arch/arm/mach-omap1/board-ams-delta.c | 2 +- arch/arm/mach-omap1/board-fsample.c | 2 +- arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 4 ++-- arch/arm/mach-omap1/board-nokia770.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- arch/arm/mach-omap1/board-palmte.c | 2 +- arch/arm/mach-omap1/board-palmtt.c | 2 +- arch/arm/mach-omap1/board-palmz71.c | 2 +- arch/arm/mach-omap1/board-perseus2.c | 2 +- arch/arm/mach-omap1/board-sx1.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 6cbc69c..52e8e53 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -156,7 +156,7 @@ } }; -static struct omap_lcd_config ams_delta_lcd_config __initdata = { +static const struct omap_lcd_config ams_delta_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index fad95b7..4e8464f 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -266,7 +266,7 @@ static int nand_dev_ready(struct mtd_info *mtd) &kp_device, }; -static struct omap_lcd_config fsample_lcd_config = { +static const struct omap_lcd_config fsample_lcd_config = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index dece47d..431f7eb 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -357,7 +357,7 @@ static int tps_setup(struct i2c_client *client, void *context) .pins[1] = 3, }; -static struct omap_lcd_config h2_lcd_config __initdata = { +static const struct omap_lcd_config h2_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 6d32bee..af46012 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -376,7 +376,7 @@ static void __init h3_init_smc91x(void) .pins[1] = 3, }; -static struct omap_lcd_config h3_lcd_config __initdata = { +static const struct omap_lcd_config h3_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index e424df9..67d4669 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -391,7 +391,7 @@ }; /* LCD Device resources */ -static struct omap_lcd_config htcherald_lcd_config __initdata = { +static const struct omap_lcd_config htcherald_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 67e1882..8c286a2 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -302,7 +302,7 @@ static void __init innovator_init_smc91x(void) .pins[0] = 2, }; -static struct omap_lcd_config innovator1510_lcd_config __initdata = { +static const struct omap_lcd_config innovator1510_lcd_config __initconst = { .ctrl_name = "internal", }; #endif @@ -323,7 +323,7 @@ static void __init innovator_init_smc91x(void) .pins[1] = 3, }; -static struct omap_lcd_config innovator1610_lcd_config __initdata = { +static const struct omap_lcd_config innovator1610_lcd_config __initconst = { .ctrl_name = "internal", }; #endif diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 06243c0..eb41db7 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -103,7 +103,7 @@ static void mipid_shutdown(struct mipid_platform_data *pdata) .shutdown = mipid_shutdown, }; -static struct omap_lcd_config nokia770_lcd_config __initdata = { +static const struct omap_lcd_config nokia770_lcd_config __initconst = { .ctrl_name = "hwa742", }; diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index d579f4e..c66372e 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -295,7 +295,7 @@ static void __init osk_init_cf(void) }; #ifdef CONFIG_OMAP_OSK_MISTRAL -static struct omap_lcd_config osk_lcd_config __initdata = { +static const struct omap_lcd_config osk_lcd_config __initconst = { .ctrl_name = "internal", }; #endif diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index e5288cd..2dc5deb 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -178,7 +178,7 @@ .pins[0] = 2, }; -static struct omap_lcd_config palmte_lcd_config __initdata = { +static const struct omap_lcd_config palmte_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index d672495..a233276 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c @@ -241,7 +241,7 @@ static int palmtt_get_pendown_state(void) .pins[0] = 2, }; -static struct omap_lcd_config palmtt_lcd_config __initdata = { +static const struct omap_lcd_config palmtt_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index aaf741b..30b0709 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c @@ -206,7 +206,7 @@ .pins[0] = 2, }; -static struct omap_lcd_config palmz71_lcd_config __initdata = { +static const struct omap_lcd_config palmz71_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 150b57b..b178841 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -225,7 +225,7 @@ static int nand_dev_ready(struct mtd_info *mtd) &kp_device, }; -static struct omap_lcd_config perseus2_lcd_config __initdata = { +static const struct omap_lcd_config perseus2_lcd_config __initconst = { .ctrl_name = "internal", }; diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 6c48225..ec27bb3 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -297,7 +297,7 @@ int sx1_setusbpower(u8 onoff) /*----------- LCD -------------------------*/ -static struct omap_lcd_config sx1_lcd_config __initdata = { +static const struct omap_lcd_config sx1_lcd_config __initconst = { .ctrl_name = "internal", };