All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fb: epson1355fb: Fix section mismatch
@ 2012-07-15  7:32 Alexander Shiyan
  2012-07-26 17:23 ` Florian Tobias Schandinat
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2012-07-15  7:32 UTC (permalink / raw)
  To: linux-fbdev

This patch fixes "section mismatch" warning in the epson1355fb driver.

WARNING: vmlinux.o(.devinit.text+0x184): Section mismatch in reference from the function epson1355fb_probe() to the function .init.text:fetch_hw_state()
The function __devinit epson1355fb_probe() references
a function __init fetch_hw_state().
If fetch_hw_state is only used by epson1355fb_probe then
annotate fetch_hw_state with a matching annotation.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/video/epson1355fb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index a268cbf..68b9b51 100644
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -477,11 +477,11 @@ static __init unsigned int get_fb_size(struct fb_info *info)
 	return size;
 }
 
-static int epson1355_width_tab[2][4] __initdata +static int epson1355_width_tab[2][4] __devinitdata      { {4, 8, 16, -1}, {9, 12, 16, -1} };
-static int epson1355_bpp_tab[8] __initdata = { 1, 2, 4, 8, 15, 16 };
+static int epson1355_bpp_tab[8] __devinitdata = { 1, 2, 4, 8, 15, 16 };
 
-static void __init fetch_hw_state(struct fb_info *info, struct epson1355_par *par)
+static void __devinit fetch_hw_state(struct fb_info *info, struct epson1355_par *par)
 {
 	struct fb_var_screeninfo *var = &info->var;
 	struct fb_fix_screeninfo *fix = &info->fix;
@@ -601,7 +601,7 @@ static int epson1355fb_remove(struct platform_device *dev)
 	return 0;
 }
 
-int __devinit epson1355fb_probe(struct platform_device *dev)
+static int __devinit epson1355fb_probe(struct platform_device *dev)
 {
 	struct epson1355_par *default_par;
 	struct fb_info *info;
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fb: epson1355fb: Fix section mismatch
  2012-07-15  7:32 [PATCH] fb: epson1355fb: Fix section mismatch Alexander Shiyan
@ 2012-07-26 17:23 ` Florian Tobias Schandinat
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Tobias Schandinat @ 2012-07-26 17:23 UTC (permalink / raw)
  To: linux-fbdev

On 07/15/2012 07:32 AM, Alexander Shiyan wrote:
> This patch fixes "section mismatch" warning in the epson1355fb driver.
> 
> WARNING: vmlinux.o(.devinit.text+0x184): Section mismatch in reference from the function epson1355fb_probe() to the function .init.text:fetch_hw_state()
> The function __devinit epson1355fb_probe() references
> a function __init fetch_hw_state().
> If fetch_hw_state is only used by epson1355fb_probe then
> annotate fetch_hw_state with a matching annotation.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/epson1355fb.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
> index a268cbf..68b9b51 100644
> --- a/drivers/video/epson1355fb.c
> +++ b/drivers/video/epson1355fb.c
> @@ -477,11 +477,11 @@ static __init unsigned int get_fb_size(struct fb_info *info)
>  	return size;
>  }
>  
> -static int epson1355_width_tab[2][4] __initdata > +static int epson1355_width_tab[2][4] __devinitdata >      { {4, 8, 16, -1}, {9, 12, 16, -1} };
> -static int epson1355_bpp_tab[8] __initdata = { 1, 2, 4, 8, 15, 16 };
> +static int epson1355_bpp_tab[8] __devinitdata = { 1, 2, 4, 8, 15, 16 };
>  
> -static void __init fetch_hw_state(struct fb_info *info, struct epson1355_par *par)
> +static void __devinit fetch_hw_state(struct fb_info *info, struct epson1355_par *par)
>  {
>  	struct fb_var_screeninfo *var = &info->var;
>  	struct fb_fix_screeninfo *fix = &info->fix;
> @@ -601,7 +601,7 @@ static int epson1355fb_remove(struct platform_device *dev)
>  	return 0;
>  }
>  
> -int __devinit epson1355fb_probe(struct platform_device *dev)
> +static int __devinit epson1355fb_probe(struct platform_device *dev)
>  {
>  	struct epson1355_par *default_par;
>  	struct fb_info *info;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-26 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-15  7:32 [PATCH] fb: epson1355fb: Fix section mismatch Alexander Shiyan
2012-07-26 17:23 ` Florian Tobias Schandinat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.