On Sat, 9 May 2009, Mauro Carvalho Chehab wrote: > Applied, but it is not producing two section mismatches. Please fix it and send > this patch alone, ASAP, since I intend to fold it together with your patch, at my -git. > > 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, Grrr, yeah, to be honest, I find this "rule," hm, at least "funny." It is an absolutely standard construct: +static struct platform_driver soc_camera_pdrv = { + .probe = soc_camera_pdrv_probe, + .remove = __exit_p(soc_camera_pdrv_remove), + .driver = { + .name = "soc-camera-pdrv", + .owner = THIS_MODULE, + }, +}; + where .probe function is a __devinit, and .remove is a __devexit, and the test is complaining about a section mismatch _unless_ you name the struct with "*driver" or "*_template" or "*_timer" or... I don't find this very helpful FWIW. Ok, I'll rename the struct to soc_camera_pdriver. If you want, you can do this yourself, just a trivial change, or I'll send a patch tonight, in about 8 hours, is that enough? > Btw, > > I've aded a new target on our building system: > make mismatch > > It would be better to use the newer tag, instead of just "make" before sending > patches to me, to be sure that the code won't generate section mismatches. You mean to the hg repository? Nice, but I'm not building in hg, I always only build in complete trees... Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html