lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Sep 2017 18:02:14 +0530
From:   Bhumika Goyal <bhumirks@...il.com>
To:     julia.lawall@...6.fr, b.zolnierkie@...sung.com,
        linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Bhumika Goyal <bhumirks@...il.com>
Subject: [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst

Make these structures static as they are not referenced in any other
file. Make them const as they are used only during a copy operation.
Replace __initdata with __initconst in file igafb.c to avoid section
conflict error.

Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
---
The changes are not compile tested as I could not find the right 
architecture to cross compile the files.

 drivers/video/fbdev/dnfb.c  | 2 +-
 drivers/video/fbdev/igafb.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/dnfb.c b/drivers/video/fbdev/dnfb.c
index 7b1492d..0941500 100644
--- a/drivers/video/fbdev/dnfb.c
+++ b/drivers/video/fbdev/dnfb.c
@@ -115,7 +115,7 @@
 	.fb_imageblit	= cfb_imageblit,
 };
 
-struct fb_var_screeninfo dnfb_var = {
+static const struct fb_var_screeninfo dnfb_var = {
 	.xres		= 1280,
 	.yres		= 1024,
 	.xres_virtual	= 2048,
diff --git a/drivers/video/fbdev/igafb.c b/drivers/video/fbdev/igafb.c
index 486f188..607b6c0 100644
--- a/drivers/video/fbdev/igafb.c
+++ b/drivers/video/fbdev/igafb.c
@@ -97,7 +97,7 @@ struct fb_var_screeninfo default_var = {
 };
 
 #ifdef CONFIG_SPARC
-struct fb_var_screeninfo default_var_1024x768 __initdata = {
+static const struct fb_var_screeninfo default_var_1024x768 __initconst = {
 	/* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */
 	.xres		= 1024,
 	.yres		= 768,
@@ -120,7 +120,7 @@ struct fb_var_screeninfo default_var_1024x768 __initdata = {
 	.vmode		= FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
 };
 
-struct fb_var_screeninfo default_var_1152x900 __initdata = {
+static const struct fb_var_screeninfo default_var_1152x900 __initconst = {
 	/* 1152x900, 76 Hz, Non-Interlaced (110.0 MHz dotclock) */
 	.xres		= 1152,
 	.yres		= 900,
@@ -143,7 +143,7 @@ struct fb_var_screeninfo default_var_1152x900 __initdata = {
 	.vmode		= FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
 };
 
-struct fb_var_screeninfo default_var_1280x1024 __initdata = {
+static const struct fb_var_screeninfo default_var_1280x1024 __initconst = {
 	/* 1280x1024, 75 Hz, Non-Interlaced (135.00 MHz dotclock) */
 	.xres		= 1280,
 	.yres		= 1024,
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ