* [PATCH] gx1fb: Fix section mismatch derived from gx1fb_driver variable @ 2011-01-03 1:31 ` Sedat Dilek 0 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2011-01-03 1:31 UTC (permalink / raw) To: linux-geode, linux-fbdev, linux-kernel; +Cc: Sedat Dilek From my build.log: WARNING: drivers/video/geode/gx1fb.o(.data+0x54): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() The variable gx1fb_driver references the function __init gx1fb_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, This patch fixes the warning. Tested with linux-next (next-20101231) Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> --- drivers/video/geode/gx1fb_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index c6b554f..9fdb115 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c @@ -437,7 +437,7 @@ static struct pci_device_id gx1fb_id_table[] = { MODULE_DEVICE_TABLE(pci, gx1fb_id_table); -static struct pci_driver gx1fb_driver = { +static struct pci_driver gx1fb_driver __refdata = { .name = "gx1fb", .id_table = gx1fb_id_table, .probe = gx1fb_probe, -- 1.7.4.rc0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] gx1fb: Fix section mismatch derived from gx1fb_driver variable @ 2011-01-03 1:31 ` Sedat Dilek 0 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2011-01-03 1:31 UTC (permalink / raw) To: linux-geode, linux-fbdev, linux-kernel; +Cc: Sedat Dilek >From my build.log: WARNING: drivers/video/geode/gx1fb.o(.data+0x54): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() The variable gx1fb_driver references the function __init gx1fb_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, This patch fixes the warning. Tested with linux-next (next-20101231) Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> --- drivers/video/geode/gx1fb_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index c6b554f..9fdb115 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c @@ -437,7 +437,7 @@ static struct pci_device_id gx1fb_id_table[] = { MODULE_DEVICE_TABLE(pci, gx1fb_id_table); -static struct pci_driver gx1fb_driver = { +static struct pci_driver gx1fb_driver __refdata = { .name = "gx1fb", .id_table = gx1fb_id_table, .probe = gx1fb_probe, -- 1.7.4.rc0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] gx1fb: Fix section mismatch derived from gx1fb_driver variable 2011-01-03 1:31 ` Sedat Dilek @ 2011-01-06 6:39 ` Paul Mundt -1 siblings, 0 replies; 11+ messages in thread From: Paul Mundt @ 2011-01-06 6:39 UTC (permalink / raw) To: Sedat Dilek; +Cc: linux-geode, linux-fbdev, linux-kernel, Sedat Dilek On Mon, Jan 03, 2011 at 02:31:29AM +0100, Sedat Dilek wrote: > diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c > index c6b554f..9fdb115 100644 > --- a/drivers/video/geode/gx1fb_core.c > +++ b/drivers/video/geode/gx1fb_core.c > @@ -437,7 +437,7 @@ static struct pci_device_id gx1fb_id_table[] = { > > MODULE_DEVICE_TABLE(pci, gx1fb_id_table); > > -static struct pci_driver gx1fb_driver = { > +static struct pci_driver gx1fb_driver __refdata = { > .name = "gx1fb", > .id_table = gx1fb_id_table, > .probe = gx1fb_probe, The problem seems to be because gx1fb_probe is annotated __init. In the PCI case you want it to be __devinit, and you're also going to want to annotate the remove function as __devexit and wrap it up with a __devexit_p(). ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gx1fb: Fix section mismatch derived from gx1fb_driver variable @ 2011-01-06 6:39 ` Paul Mundt 0 siblings, 0 replies; 11+ messages in thread From: Paul Mundt @ 2011-01-06 6:39 UTC (permalink / raw) To: Sedat Dilek; +Cc: linux-geode, linux-fbdev, linux-kernel, Sedat Dilek On Mon, Jan 03, 2011 at 02:31:29AM +0100, Sedat Dilek wrote: > diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c > index c6b554f..9fdb115 100644 > --- a/drivers/video/geode/gx1fb_core.c > +++ b/drivers/video/geode/gx1fb_core.c > @@ -437,7 +437,7 @@ static struct pci_device_id gx1fb_id_table[] = { > > MODULE_DEVICE_TABLE(pci, gx1fb_id_table); > > -static struct pci_driver gx1fb_driver = { > +static struct pci_driver gx1fb_driver __refdata = { > .name = "gx1fb", > .id_table = gx1fb_id_table, > .probe = gx1fb_probe, The problem seems to be because gx1fb_probe is annotated __init. In the PCI case you want it to be __devinit, and you're also going to want to annotate the remove function as __devexit and wrap it up with a __devexit_p(). ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] gx1fb: Fix section mismatch warnings 2011-01-06 6:39 ` Paul Mundt @ 2011-06-16 19:31 ` Randy Dunlap -1 siblings, 0 replies; 11+ messages in thread From: Randy Dunlap @ 2011-06-16 19:31 UTC (permalink / raw) To: Paul Mundt Cc: Sedat Dilek, linux-geode, linux-fbdev, linux-kernel, Sedat Dilek On Thu, 6 Jan 2011 15:39:07 +0900 Paul Mundt wrote: > The problem seems to be because gx1fb_probe is annotated __init. In the > PCI case you want it to be __devinit, and you're also going to want to > annotate the remove function as __devexit and wrap it up with a > __devexit_p(). > -- From: Randy Dunlap <randy.dunlap@oracle.com> Fix a chain of section mismatches in geode driver, beginning with: WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() The variable gx1fb_driver references the function __init gx1fb_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Making the changes that Paul pointed out resulted in a few more changes being needed, so they are all included here. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- drivers/video/geode/gx1fb_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- lnx-30-rc3.orig/drivers/video/geode/gx1fb_core.c +++ lnx-30-rc3/drivers/video/geode/gx1fb_core.c @@ -29,7 +29,7 @@ static int crt_option = 1; static char panel_option[32] = ""; /* Modes relevant to the GX1 (taken from modedb.c) */ -static const struct fb_videomode __initdata gx1_modedb[] = { +static const struct fb_videomode __devinitdata gx1_modedb[] = { /* 640x480-60 VESA */ { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, @@ -195,7 +195,7 @@ static int gx1fb_blank(int blank_mode, s return par->vid_ops->blank_display(info, blank_mode); } -static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) +static int __devinit gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) { struct geodefb_par *par = info->par; unsigned gx_base; @@ -268,7 +268,7 @@ static struct fb_ops gx1fb_ops = { .fb_imageblit = cfb_imageblit, }; -static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev) +static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev) { struct geodefb_par *par; struct fb_info *info; @@ -318,7 +318,7 @@ static struct fb_info * __init gx1fb_ini return info; } -static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) +static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct geodefb_par *par; struct fb_info *info; @@ -382,7 +382,7 @@ static int __init gx1fb_probe(struct pci return ret; } -static void gx1fb_remove(struct pci_dev *pdev) +static void __devexit gx1fb_remove(struct pci_dev *pdev) { struct fb_info *info = pci_get_drvdata(pdev); struct geodefb_par *par = info->par; @@ -441,7 +441,7 @@ static struct pci_driver gx1fb_driver = .name = "gx1fb", .id_table = gx1fb_id_table, .probe = gx1fb_probe, - .remove = gx1fb_remove, + .remove = __devexit_p(gx1fb_remove), }; static int __init gx1fb_init(void) @@ -456,7 +456,7 @@ static int __init gx1fb_init(void) return pci_register_driver(&gx1fb_driver); } -static void __exit gx1fb_cleanup(void) +static void __devexit gx1fb_cleanup(void) { pci_unregister_driver(&gx1fb_driver); } ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] gx1fb: Fix section mismatch warnings @ 2011-06-16 19:31 ` Randy Dunlap 0 siblings, 0 replies; 11+ messages in thread From: Randy Dunlap @ 2011-06-16 19:31 UTC (permalink / raw) To: Paul Mundt Cc: Sedat Dilek, linux-geode, linux-fbdev, linux-kernel, Sedat Dilek On Thu, 6 Jan 2011 15:39:07 +0900 Paul Mundt wrote: > The problem seems to be because gx1fb_probe is annotated __init. In the > PCI case you want it to be __devinit, and you're also going to want to > annotate the remove function as __devexit and wrap it up with a > __devexit_p(). > -- From: Randy Dunlap <randy.dunlap@oracle.com> Fix a chain of section mismatches in geode driver, beginning with: WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() The variable gx1fb_driver references the function __init gx1fb_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Making the changes that Paul pointed out resulted in a few more changes being needed, so they are all included here. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- drivers/video/geode/gx1fb_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- lnx-30-rc3.orig/drivers/video/geode/gx1fb_core.c +++ lnx-30-rc3/drivers/video/geode/gx1fb_core.c @@ -29,7 +29,7 @@ static int crt_option = 1; static char panel_option[32] = ""; /* Modes relevant to the GX1 (taken from modedb.c) */ -static const struct fb_videomode __initdata gx1_modedb[] = { +static const struct fb_videomode __devinitdata gx1_modedb[] = { /* 640x480-60 VESA */ { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, @@ -195,7 +195,7 @@ static int gx1fb_blank(int blank_mode, s return par->vid_ops->blank_display(info, blank_mode); } -static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) +static int __devinit gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) { struct geodefb_par *par = info->par; unsigned gx_base; @@ -268,7 +268,7 @@ static struct fb_ops gx1fb_ops = { .fb_imageblit = cfb_imageblit, }; -static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev) +static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev) { struct geodefb_par *par; struct fb_info *info; @@ -318,7 +318,7 @@ static struct fb_info * __init gx1fb_ini return info; } -static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) +static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct geodefb_par *par; struct fb_info *info; @@ -382,7 +382,7 @@ static int __init gx1fb_probe(struct pci return ret; } -static void gx1fb_remove(struct pci_dev *pdev) +static void __devexit gx1fb_remove(struct pci_dev *pdev) { struct fb_info *info = pci_get_drvdata(pdev); struct geodefb_par *par = info->par; @@ -441,7 +441,7 @@ static struct pci_driver gx1fb_driver = .name = "gx1fb", .id_table = gx1fb_id_table, .probe = gx1fb_probe, - .remove = gx1fb_remove, + .remove = __devexit_p(gx1fb_remove), }; static int __init gx1fb_init(void) @@ -456,7 +456,7 @@ static int __init gx1fb_init(void) return pci_register_driver(&gx1fb_driver); } -static void __exit gx1fb_cleanup(void) +static void __devexit gx1fb_cleanup(void) { pci_unregister_driver(&gx1fb_driver); } ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gx1fb: Fix section mismatch warnings 2011-06-16 19:31 ` Randy Dunlap @ 2011-06-17 7:15 ` Sedat Dilek -1 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2011-06-17 7:15 UTC (permalink / raw) To: Randy Dunlap; +Cc: Paul Mundt, linux-geode, linux-fbdev, linux-kernel On Thu, Jun 16, 2011 at 9:31 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote: > On Thu, 6 Jan 2011 15:39:07 +0900 Paul Mundt wrote: > >> The problem seems to be because gx1fb_probe is annotated __init. In the >> PCI case you want it to be __devinit, and you're also going to want to >> annotate the remove function as __devexit and wrap it up with a >> __devexit_p(). >> -- > > From: Randy Dunlap <randy.dunlap@oracle.com> > > Fix a chain of section mismatches in geode driver, beginning with: > > WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() > The variable gx1fb_driver references > the function __init gx1fb_probe() > If the reference is valid then annotate the > variable with __init* or __refdata (see linux/init.h) or name the variable: > *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console > > Making the changes that Paul pointed out resulted in a few more > changes being needed, so they are all included here. > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > --- Hi Randy, thanks for taking care of this old issue! It's around a week I did not compile a linux-next kernel. I should again enable full section mismatch in my setup. Regards, - Sedat - ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gx1fb: Fix section mismatch warnings @ 2011-06-17 7:15 ` Sedat Dilek 0 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2011-06-17 7:15 UTC (permalink / raw) To: Randy Dunlap; +Cc: Paul Mundt, linux-geode, linux-fbdev, linux-kernel On Thu, Jun 16, 2011 at 9:31 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote: > On Thu, 6 Jan 2011 15:39:07 +0900 Paul Mundt wrote: > >> The problem seems to be because gx1fb_probe is annotated __init. In the >> PCI case you want it to be __devinit, and you're also going to want to >> annotate the remove function as __devexit and wrap it up with a >> __devexit_p(). >> -- > > From: Randy Dunlap <randy.dunlap@oracle.com> > > Fix a chain of section mismatches in geode driver, beginning with: > > WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() > The variable gx1fb_driver references > the function __init gx1fb_probe() > If the reference is valid then annotate the > variable with __init* or __refdata (see linux/init.h) or name the variable: > *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console > > Making the changes that Paul pointed out resulted in a few more > changes being needed, so they are all included here. > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > --- Hi Randy, thanks for taking care of this old issue! It's around a week I did not compile a linux-next kernel. I should again enable full section mismatch in my setup. Regards, - Sedat - ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gx1fb: Fix section mismatch warnings 2011-06-16 19:31 ` Randy Dunlap @ 2011-06-24 8:01 ` Paul Mundt -1 siblings, 0 replies; 11+ messages in thread From: Paul Mundt @ 2011-06-24 8:01 UTC (permalink / raw) To: Randy Dunlap Cc: Sedat Dilek, linux-geode, linux-fbdev, linux-kernel, Sedat Dilek On Thu, Jun 16, 2011 at 12:31:19PM -0700, Randy Dunlap wrote: > Fix a chain of section mismatches in geode driver, beginning with: > > WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() > The variable gx1fb_driver references > the function __init gx1fb_probe() > If the reference is valid then annotate the > variable with __init* or __refdata (see linux/init.h) or name the variable: > *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console > > Making the changes that Paul pointed out resulted in a few more > changes being needed, so they are all included here. On Thu, Jun 16, 2011 at 12:32:40PM -0700, Randy Dunlap wrote: > Fix section mismatch warning in sm501fb: > > WARNING: drivers/video/sm501fb.o(.text+0x21d6): Section mismatch in reference from the function sm501fb_init_fb() to the variable .devinit.data:sm501_default_mode > The function sm501fb_init_fb() references > the variable __devinitdata sm501_default_mode. > This is often because sm501fb_init_fb lacks a __devinitdata > annotation or the annotation of sm501_default_mode is wrong. Both applied, thanks. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gx1fb: Fix section mismatch warnings @ 2011-06-24 8:01 ` Paul Mundt 0 siblings, 0 replies; 11+ messages in thread From: Paul Mundt @ 2011-06-24 8:01 UTC (permalink / raw) To: Randy Dunlap Cc: Sedat Dilek, linux-geode, linux-fbdev, linux-kernel, Sedat Dilek On Thu, Jun 16, 2011 at 12:31:19PM -0700, Randy Dunlap wrote: > Fix a chain of section mismatches in geode driver, beginning with: > > WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() > The variable gx1fb_driver references > the function __init gx1fb_probe() > If the reference is valid then annotate the > variable with __init* or __refdata (see linux/init.h) or name the variable: > *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console > > Making the changes that Paul pointed out resulted in a few more > changes being needed, so they are all included here. On Thu, Jun 16, 2011 at 12:32:40PM -0700, Randy Dunlap wrote: > Fix section mismatch warning in sm501fb: > > WARNING: drivers/video/sm501fb.o(.text+0x21d6): Section mismatch in reference from the function sm501fb_init_fb() to the variable .devinit.data:sm501_default_mode > The function sm501fb_init_fb() references > the variable __devinitdata sm501_default_mode. > This is often because sm501fb_init_fb lacks a __devinitdata > annotation or the annotation of sm501_default_mode is wrong. Both applied, thanks. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] sm501fb: fix section mismatch warning @ 2011-06-16 19:32 ` Randy Dunlap 0 siblings, 0 replies; 11+ messages in thread From: Randy Dunlap @ 2011-06-16 19:32 UTC (permalink / raw) To: linux-fbdev From: Randy Dunlap <randy.dunlap@oracle.com> Fix section mismatch warning in sm501fb: WARNING: drivers/video/sm501fb.o(.text+0x21d6): Section mismatch in reference from the function sm501fb_init_fb() to the variable .devinit.data:sm501_default_mode The function sm501fb_init_fb() references the variable __devinitdata sm501_default_mode. This is often because sm501fb_init_fb lacks a __devinitdata annotation or the annotation of sm501_default_mode is wrong. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- drivers/video/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- lnx-30-rc3.orig/drivers/video/sm501fb.c +++ lnx-30-rc3/drivers/video/sm501fb.c @@ -1664,7 +1664,7 @@ static void sm501fb_stop(struct sm501fb_ resource_size(info->regs_res)); } -static int sm501fb_init_fb(struct fb_info *fb, +static int __devinit sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head, const char *fbname) { ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-06-24 8:02 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-03 1:31 [PATCH] gx1fb: Fix section mismatch derived from gx1fb_driver variable Sedat Dilek 2011-01-03 1:31 ` Sedat Dilek 2011-01-06 6:39 ` Paul Mundt 2011-01-06 6:39 ` Paul Mundt 2011-06-16 19:31 ` [PATCH] gx1fb: Fix section mismatch warnings Randy Dunlap 2011-06-16 19:31 ` Randy Dunlap 2011-06-17 7:15 ` Sedat Dilek 2011-06-17 7:15 ` Sedat Dilek 2011-06-24 8:01 ` Paul Mundt 2011-06-24 8:01 ` Paul Mundt 2011-06-16 19:32 ` [PATCH] sm501fb: fix section mismatch warning Randy Dunlap
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.