* [PATCH] video: fbdev: make fb_var_screeninfo const @ 2017-08-30 11:52 ` Bhumika Goyal 2017-09-04 13:48 ` Bartlomiej Zolnierkiewicz 2017-09-14 12:44 ` [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst Bhumika Goyal 0 siblings, 2 replies; 4+ messages in thread From: Bhumika Goyal @ 2017-08-30 11:52 UTC (permalink / raw) To: julia.lawall, gxt, b.zolnierkie, linux-fbdev, linux-kernel; +Cc: Bhumika Goyal Make these const as they are not modified anywhere. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> --- Could not cross compile fb-puv3.o file. drivers/video/fbdev/fb-puv3.c | 2 +- drivers/video/fbdev/maxinefb.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/pvr2fb.c | 2 +- drivers/video/fbdev/q40fb.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/fb-puv3.c b/drivers/video/fbdev/fb-puv3.c index 88fa2e7..d9e816d 100644 --- a/drivers/video/fbdev/fb-puv3.c +++ b/drivers/video/fbdev/fb-puv3.c @@ -69,7 +69,7 @@ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, }; -static struct fb_var_screeninfo unifb_default = { +static const struct fb_var_screeninfo unifb_default = { .xres = 640, .yres = 480, .xres_virtual = 640, diff --git a/drivers/video/fbdev/maxinefb.c b/drivers/video/fbdev/maxinefb.c index cab7333..5bb1b5c 100644 --- a/drivers/video/fbdev/maxinefb.c +++ b/drivers/video/fbdev/maxinefb.c @@ -39,7 +39,7 @@ static struct fb_info fb_info; -static struct fb_var_screeninfo maxinefb_defined = { +static const struct fb_var_screeninfo maxinefb_defined = { .xres = 1024, .yres = 768, .xres_virtual = 1024, diff --git a/drivers/video/fbdev/pmag-aa-fb.c b/drivers/video/fbdev/pmag-aa-fb.c index 39922f0..8cbb1d2 100644 --- a/drivers/video/fbdev/pmag-aa-fb.c +++ b/drivers/video/fbdev/pmag-aa-fb.c @@ -67,7 +67,7 @@ struct aafb_par { struct bt431_regs __iomem *bt431; }; -static struct fb_var_screeninfo aafb_defined = { +static const struct fb_var_screeninfo aafb_defined = { .xres = 1280, .yres = 1024, .xres_virtual = 2048, diff --git a/drivers/video/fbdev/pmag-ba-fb.c b/drivers/video/fbdev/pmag-ba-fb.c index 1fd02f4..d88ca10 100644 --- a/drivers/video/fbdev/pmag-ba-fb.c +++ b/drivers/video/fbdev/pmag-ba-fb.c @@ -43,7 +43,7 @@ struct pmagbafb_par { }; -static struct fb_var_screeninfo pmagbafb_defined = { +static const struct fb_var_screeninfo pmagbafb_defined = { .xres = 1024, .yres = 864, .xres_virtual = 1024, diff --git a/drivers/video/fbdev/pmagb-b-fb.c b/drivers/video/fbdev/pmagb-b-fb.c index 46e96c4..d3849cd 100644 --- a/drivers/video/fbdev/pmagb-b-fb.c +++ b/drivers/video/fbdev/pmagb-b-fb.c @@ -44,7 +44,7 @@ struct pmagbbfb_par { }; -static struct fb_var_screeninfo pmagbbfb_defined = { +static const struct fb_var_screeninfo pmagbbfb_defined = { .bits_per_pixel = 8, .red.length = 8, .green.length = 8, diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c index c6212ab..867c521 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -154,7 +154,7 @@ .accel = FB_ACCEL_NONE, }; -static struct fb_var_screeninfo pvr2_var = { +static const struct fb_var_screeninfo pvr2_var = { .xres = 640, .yres = 480, .xres_virtual = 640, diff --git a/drivers/video/fbdev/q40fb.c b/drivers/video/fbdev/q40fb.c index 04ea330..0b93aa9 100644 --- a/drivers/video/fbdev/q40fb.c +++ b/drivers/video/fbdev/q40fb.c @@ -36,7 +36,7 @@ .accel = FB_ACCEL_NONE, }; -static struct fb_var_screeninfo q40fb_var = { +static const struct fb_var_screeninfo q40fb_var = { .xres = 1024, .yres = 512, .xres_virtual = 1024, -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: make fb_var_screeninfo const 2017-08-30 11:52 ` [PATCH] video: fbdev: make fb_var_screeninfo const Bhumika Goyal @ 2017-09-04 13:48 ` Bartlomiej Zolnierkiewicz 2017-09-14 12:44 ` [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst Bhumika Goyal 1 sibling, 0 replies; 4+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2017-09-04 13:48 UTC (permalink / raw) To: Bhumika Goyal; +Cc: julia.lawall, gxt, linux-fbdev, linux-kernel On Wednesday, August 30, 2017 05:10:28 PM Bhumika Goyal wrote: > Make these const as they are not modified anywhere. > > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Patch queued for 4.14, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst 2017-08-30 11:52 ` [PATCH] video: fbdev: make fb_var_screeninfo const Bhumika Goyal 2017-09-04 13:48 ` Bartlomiej Zolnierkiewicz @ 2017-09-14 12:44 ` Bhumika Goyal 2017-10-12 16:06 ` Bartlomiej Zolnierkiewicz 1 sibling, 1 reply; 4+ messages in thread From: Bhumika Goyal @ 2017-09-14 12:44 UTC (permalink / raw) To: julia.lawall, b.zolnierkie, linux-fbdev, linux-kernel; +Cc: Bhumika Goyal 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@gmail.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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst 2017-09-14 12:44 ` [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst Bhumika Goyal @ 2017-10-12 16:06 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 4+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2017-10-12 16:06 UTC (permalink / raw) To: Bhumika Goyal Cc: julia.lawall, linux-fbdev, linux-kernel, dri-devel, sparclinux [ added dri-devel & sparclinux MLs to cc: ] On Thursday, September 14, 2017 06:02:14 PM Bhumika Goyal wrote: > 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@gmail.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(-) You can deduce such things by looking into Makefile-s and KConfig-s: - dnfb is used by apollo platform of m68k arch - igafb can be used on sparc32 arch I took care of compile testing these changes and discovered that in the current vanilla kernel (v4.14-rc4) igafb fails to build. Thus I've only queued dnfb changes for v4.15 kernel for now. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-12 16:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CGME20170830114048epcas1p48ae21ff4b434a6cda51f6637ad555db8@epcas1p4.samsung.com> 2017-08-30 11:52 ` [PATCH] video: fbdev: make fb_var_screeninfo const Bhumika Goyal 2017-09-04 13:48 ` Bartlomiej Zolnierkiewicz 2017-09-14 12:44 ` [PATCH] video: fbdev: make fb_var_screeninfo static, const and __initconst Bhumika Goyal 2017-10-12 16:06 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).