From: Sam Ravnborg <sam@ravnborg.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: dubious section mismatch test (was Re: [PULL] soc-camera: one commit as v4l2-dev preparation)
Date: Sat, 6 Jun 2009 00:19:20 +0200 [thread overview]
Message-ID: <20090605221920.GL29008@uranus.ravnborg.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0905092113280.10748@axis700.grange>
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
prev parent reply other threads:[~2009-06-05 22:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090605221920.GL29008@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox