From patchwork Sun Aug 20 17:44:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9911247 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 28D1E602B1 for ; Sun, 20 Aug 2017 17:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 102B828710 for ; Sun, 20 Aug 2017 17:45:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04B2F28779; Sun, 20 Aug 2017 17:45:49 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7925428710 for ; Sun, 20 Aug 2017 17:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266AbdHTRpD (ORCPT ); Sun, 20 Aug 2017 13:45:03 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36333 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753072AbdHTRpC (ORCPT ); Sun, 20 Aug 2017 13:45:02 -0400 Received: by mail-pg0-f68.google.com with SMTP id y129so20386875pgy.3; Sun, 20 Aug 2017 10:45:02 -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=Y+KvvRBluCBDjaE+9Z/Ckel0ggS1kJuT9jzxnq4zGzQ=; b=aDMKagUHVctBFrsmSC9LXC/XYvUcH4bHuLZSGRdRIPY6edIeSkCfWva0VFImK1gdu5 vQT5m6Y+Hs6TgEYgfDbygW2618TzO+sN6Pn+UpGdMisKRDQBe1/YIOZjTjZnyxLS7wLp +G4ITR4PZ4OnYVkrO3IZYX/YLLXB4H58CtxMR8j/L3Wi596XtgkYKRKEXXp2hvLiOiun emhIxMHI4pg+6sN7zvkDTXerfBMYiuQcxUie5eKz5f6E9xdJ5hd+njZsZ1LNL17Ow7wt +bKA74PoEppkPE7vRIQgKNASXuSm6YEP47kATsqkENxaVBodxGlF+jXBneM1ezQKQrQ4 bL5w== 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=Y+KvvRBluCBDjaE+9Z/Ckel0ggS1kJuT9jzxnq4zGzQ=; b=kRJ8jUxNUQ/oYGAcTG2GBE9bEonXdk6RNF5j/N1IvySZEndv3aVVs/k5MZOr1eSw0Y prOb/x1cWaqBhN5VUdjKaj4Hc8EmSNrjki1mFF8Ts4eHYCa+EzAzTxoe0Ag7Jv410qX9 Qiw/u/yP42hlkhl6maA2dXNCiLSsb1tb6j9BRdGLSgnsIyYHU9xn3CbktZBQS876/rBZ y/Sfuw+92M4B7Tya7yyd6lUhhdhFyajQ1/+Jjt5eaolN/sK4dd6ZWO9RaaNjzX3sPqoq NlxlAMccA3asEH1VFQXfXBaVzCwIY6hIJtOCo8zG2J1aOKyaTWzYD5Wxy/jSaLaMZncg ue6g== X-Gm-Message-State: AHYfb5iZ0W5e+COKulqPgPyeZIvhtIhJePM35XMsIIUDvQSEPAUpg0HU x+HWVDQpwFTGuw== X-Received: by 10.84.229.130 with SMTP id c2mr16344509plk.215.1503251101783; Sun, 20 Aug 2017 10:45:01 -0700 (PDT) Received: from gmail.com ([117.196.112.135]) by smtp.gmail.com with ESMTPSA id o25sm5739844pfa.153.2017.08.20.10.44.55 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 20 Aug 2017 10:45:00 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sun, 20 Aug 2017 23:14:52 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, b.zolnierkie@samsung.com, nicolas.ferre@microchip.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Bhumika Goyal Subject: [PATCH] video: fbdev: annotate fb_fix_screeninfo with const and __initconst Date: Sun, 20 Aug 2017 23:14:51 +0530 Message-Id: <1503251091-23485-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these const as they are only used during a copy operation. Some structures are used as a copy operation inside __init functions, so make them const and replace __initdata with __initconst to avoid section conflict error. Signed-off-by: Bhumika Goyal --- drivers/video/fbdev/68328fb.c | 2 +- drivers/video/fbdev/atmel_lcdfb.c | 2 +- drivers/video/fbdev/dnfb.c | 2 +- drivers/video/fbdev/grvga.c | 2 +- drivers/video/fbdev/pmag-aa-fb.c | 2 +- drivers/video/fbdev/pmag-ba-fb.c | 2 +- drivers/video/fbdev/pmagb-b-fb.c | 2 +- drivers/video/fbdev/ps3fb.c | 2 +- drivers/video/fbdev/skeletonfb.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c index c0c6b88..d48e960 100644 --- a/drivers/video/fbdev/68328fb.c +++ b/drivers/video/fbdev/68328fb.c @@ -72,7 +72,7 @@ .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo mc68x328fb_fix __initdata = { +static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = { .id = "68328fb", .type = FB_TYPE_PACKED_PIXELS, .xpanstep = 1, diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index 669ecc7..e06358d 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -320,7 +320,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int } } -static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { +static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = { .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_TRUECOLOR, .xpanstep = 0, diff --git a/drivers/video/fbdev/dnfb.c b/drivers/video/fbdev/dnfb.c index 3526899..7b1492d 100644 --- a/drivers/video/fbdev/dnfb.c +++ b/drivers/video/fbdev/dnfb.c @@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var = { .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo dnfb_fix = { +static const struct fb_fix_screeninfo dnfb_fix = { .id = "Apollo Mono", .smem_start = (FRAME_BUFFER_START + IO_BASE), .smem_len = FRAME_BUFFER_LEN, diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c index b471f92..8fc8f46 100644 --- a/drivers/video/fbdev/grvga.c +++ b/drivers/video/fbdev/grvga.c @@ -70,7 +70,7 @@ struct grvga_par { } }; -static struct fb_fix_screeninfo grvga_fix = { +static const struct fb_fix_screeninfo grvga_fix = { .id = "AG SVGACTRL", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR, diff --git a/drivers/video/fbdev/pmag-aa-fb.c b/drivers/video/fbdev/pmag-aa-fb.c index 39922f0..b07ef49 100644 --- a/drivers/video/fbdev/pmag-aa-fb.c +++ b/drivers/video/fbdev/pmag-aa-fb.c @@ -90,7 +90,7 @@ struct aafb_par { .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo aafb_fix = { +static const struct fb_fix_screeninfo aafb_fix = { .id = "PMAG-AA", .smem_len = (2048 * 1024), .type = FB_TYPE_PACKED_PIXELS, diff --git a/drivers/video/fbdev/pmag-ba-fb.c b/drivers/video/fbdev/pmag-ba-fb.c index 1fd02f4..8d1a878 100644 --- a/drivers/video/fbdev/pmag-ba-fb.c +++ b/drivers/video/fbdev/pmag-ba-fb.c @@ -67,7 +67,7 @@ struct pmagbafb_par { .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo pmagbafb_fix = { +static const struct fb_fix_screeninfo pmagbafb_fix = { .id = "PMAG-BA", .smem_len = (1024 * 1024), .type = FB_TYPE_PACKED_PIXELS, diff --git a/drivers/video/fbdev/pmagb-b-fb.c b/drivers/video/fbdev/pmagb-b-fb.c index 46e96c4..5ad9b63 100644 --- a/drivers/video/fbdev/pmagb-b-fb.c +++ b/drivers/video/fbdev/pmagb-b-fb.c @@ -57,7 +57,7 @@ struct pmagbbfb_par { .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo pmagbbfb_fix = { +static const struct fb_fix_screeninfo pmagbbfb_fix = { .id = "PMAGB-BA", .smem_len = (2048 * 1024), .type = FB_TYPE_PACKED_PIXELS, diff --git a/drivers/video/fbdev/ps3fb.c b/drivers/video/fbdev/ps3fb.c index b269abd..5ed2db3 100644 --- a/drivers/video/fbdev/ps3fb.c +++ b/drivers/video/fbdev/ps3fb.c @@ -952,7 +952,7 @@ static irqreturn_t ps3fb_vsync_interrupt(int irq, void *ptr) .fb_compat_ioctl = ps3fb_ioctl }; -static struct fb_fix_screeninfo ps3fb_fix = { +static const struct fb_fix_screeninfo ps3fb_fix = { .id = DEVICE_NAME, .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_TRUECOLOR, diff --git a/drivers/video/fbdev/skeletonfb.c b/drivers/video/fbdev/skeletonfb.c index 09a1d8c..7f4e908 100644 --- a/drivers/video/fbdev/skeletonfb.c +++ b/drivers/video/fbdev/skeletonfb.c @@ -84,7 +84,7 @@ * if we don't use modedb. If we do use modedb see xxxfb_init how to use it * to get a fb_var_screeninfo. Otherwise define a default var as well. */ -static struct fb_fix_screeninfo xxxfb_fix = { +static const struct fb_fix_screeninfo xxxfb_fix = { .id = "FB's name", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR,