* dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation)
[not found] ` <20090509062726.22d18182@pedra.chehab.org>
@ 2009-05-09 16:13 ` Guennadi Liakhovetski
2009-05-09 16:54 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2009-05-09 16:13 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Linux Media Mailing List, linux-kernel, sam, linux-kbuild
On Sat, 9 May 2009, Mauro Carvalho Chehab wrote:
> WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x0): Section mismatch in reference from the variable soc_camera_pdrv to the function .devinit.text:soc_camera_pdrv_probe()
> The variable soc_camera_pdrv references
> the function __devinit soc_camera_pdrv_probe()
> If the reference is valid then annotate the
> variable with __init* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
>
> WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x8): Section mismatch in reference from the variable soc_camera_pdrv to the function .devexit.text:soc_camera_pdrv_remove()
> The variable soc_camera_pdrv references
> the function __devexit soc_camera_pdrv_remove()
> If the reference is valid then annotate the
> variable with __exit* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
FWIW, I find this test dubious. Matching on symbol names doesn't seem like
a good idea to me. Can we introduce a new marker instead something like
static struct whatever_driver __driver driver = {
.probe = my_probe,
.remove = __exit_p(my_remove),
};
to put them in a new special section? Or is there a better solution?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation)
2009-05-09 16:13 ` dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation) Guennadi Liakhovetski
@ 2009-05-09 16:54 ` Sam Ravnborg
2009-05-10 18:33 ` Guennadi Liakhovetski
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2009-05-09 16:54 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Mauro Carvalho Chehab, Linux Media Mailing List, linux-kernel,
linux-kbuild
On Sat, May 09, 2009 at 06:13:13PM +0200, Guennadi Liakhovetski wrote:
> On Sat, 9 May 2009, Mauro Carvalho Chehab wrote:
>
> > WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x0): Section mismatch in reference from the variable soc_camera_pdrv to the function .devinit.text:soc_camera_pdrv_probe()
> > The variable soc_camera_pdrv references
> > the function __devinit soc_camera_pdrv_probe()
> > If the reference is valid then annotate the
> > variable with __init* (see linux/init.h) or name the variable:
> > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> >
> > WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x8): Section mismatch in reference from the variable soc_camera_pdrv to the function .devexit.text:soc_camera_pdrv_remove()
> > The variable soc_camera_pdrv references
> > the function __devexit soc_camera_pdrv_remove()
> > If the reference is valid then annotate the
> > variable with __exit* (see linux/init.h) or name the variable:
> > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
>
> FWIW, I find this test dubious. Matching on symbol names doesn't seem like
> a good idea to me. Can we introduce a new marker instead something like
>
> static struct whatever_driver __driver driver = {
> .probe = my_probe,
> .remove = __exit_p(my_remove),
> };
>
> to put them in a new special section? Or is there a better solution?
We already have that:
__refdata would be your choice in this case.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation)
2009-05-09 16:54 ` Sam Ravnborg
@ 2009-05-10 18:33 ` Guennadi Liakhovetski
2009-06-05 22:19 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2009-05-10 18:33 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Mauro Carvalho Chehab, Linux Media Mailing List, linux-kernel,
linux-kbuild
On Sat, 9 May 2009, Sam Ravnborg wrote:
> On Sat, May 09, 2009 at 06:13:13PM +0200, Guennadi Liakhovetski wrote:
> > On Sat, 9 May 2009, Mauro Carvalho Chehab wrote:
> >
> > > WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x0): Section mismatch in reference from the variable soc_camera_pdrv to the function .devinit.text:soc_camera_pdrv_probe()
> > > The variable soc_camera_pdrv references
> > > the function __devinit soc_camera_pdrv_probe()
> > > If the reference is valid then annotate the
> > > variable with __init* (see linux/init.h) or name the variable:
> > > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> > >
> > > WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x8): Section mismatch in reference from the variable soc_camera_pdrv to the function .devexit.text:soc_camera_pdrv_remove()
> > > The variable soc_camera_pdrv references
> > > the function __devexit soc_camera_pdrv_remove()
> > > If the reference is valid then annotate the
> > > variable with __exit* (see linux/init.h) or name the variable:
> > > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> >
> > FWIW, I find this test dubious. Matching on symbol names doesn't seem like
> > a good idea to me. Can we introduce a new marker instead something like
> >
> > static struct whatever_driver __driver driver = {
> > .probe = my_probe,
> > .remove = __exit_p(my_remove),
> > };
> >
> > to put them in a new special section? Or is there a better solution?
>
> We already have that:
> __refdata would be your choice in this case.
Aha, great! Then also the warning text should be changed, shouldn't it?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation)
2009-05-10 18:33 ` Guennadi Liakhovetski
@ 2009-06-05 22:19 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2009-06-05 22:19 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Mauro Carvalho Chehab, Linux Media Mailing List, linux-kernel,
linux-kbuild
On Sun, May 10, 2009 at 08:33:03PM +0200, Guennadi Liakhovetski wrote:
> On Sat, 9 May 2009, Sam Ravnborg wrote:
>
> > On Sat, May 09, 2009 at 06:13:13PM +0200, Guennadi Liakhovetski wrote:
> > > On Sat, 9 May 2009, Mauro Carvalho Chehab wrote:
> > >
> > > > WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x0): Section mismatch in reference from the variable soc_camera_pdrv to the function .devinit.text:soc_camera_pdrv_probe()
> > > > The variable soc_camera_pdrv references
> > > > the function __devinit soc_camera_pdrv_probe()
> > > > If the reference is valid then annotate the
> > > > variable with __init* (see linux/init.h) or name the variable:
> > > > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> > > >
> > > > WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x8): Section mismatch in reference from the variable soc_camera_pdrv to the function .devexit.text:soc_camera_pdrv_remove()
> > > > The variable soc_camera_pdrv references
> > > > the function __devexit soc_camera_pdrv_remove()
> > > > If the reference is valid then annotate the
> > > > variable with __exit* (see linux/init.h) or name the variable:
> > > > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> > >
> > > FWIW, I find this test dubious. Matching on symbol names doesn't seem like
> > > a good idea to me. Can we introduce a new marker instead something like
> > >
> > > static struct whatever_driver __driver driver = {
> > > .probe = my_probe,
> > > .remove = __exit_p(my_remove),
> > > };
> > >
> > > to put them in a new special section? Or is there a better solution?
> >
> > We already have that:
> > __refdata would be your choice in this case.
>
> Aha, great! Then also the warning text should be changed, shouldn't it?
Yep - included __refdata in the warning now.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-05 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.64.0905071841331.9460@axis700.grange>
[not found] ` <20090509062726.22d18182@pedra.chehab.org>
2009-05-09 16:13 ` dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation) Guennadi Liakhovetski
2009-05-09 16:54 ` Sam Ravnborg
2009-05-10 18:33 ` Guennadi Liakhovetski
2009-06-05 22:19 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox