[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090112212109.GA15185@uranus.ravnborg.org>
Date: Mon, 12 Jan 2009 22:21:09 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: wrong usage of __devexit_p and __exit_p
On Mon, Jan 12, 2009 at 09:55:20PM +0100, Uwe Kleine-König wrote:
> Hello Sam,
>
> > > Did you check that this did not introduce any new Section mismatch warnings?
> > > We have seen several __exit annotated functions that was used from __init
> > > annotated code or even from normal code.
> > > Thus the __exit annotation was wrong in these cases.
> > I wrote in the commit logs, that the functions are only used as argument
> > to __{dev,}exit_p. There are no direct calls. (IIRC there was only one
> > exception that I checked manually.)
> Actually the case I remembered here isn't part of the series.
>
> > I think the __{dev,}exit_p wrappers are only used to define remove
> > callbacks, so there should be no harm.
> In the meantime I checked this:
>
> ~/gsrc/linux-2.6$ git diff-tree -r linus/master expsec-master | cut -f 2 | xargs grep -h -E '__(dev)?exit_p'
> .remove = __devexit_p(s3c_adc_remove),
> .remove = __devexit_p(s3c_pwm_remove),
> .remove = __devexit_p(virtblk_remove),
> .remove = __devexit_p(virtrng_remove),
> .remove = __devexit_p(stli_pciremove)
> .remove = __devexit_p(hifn_remove),
> .remove = __devexit_p(mpc85xx_pci_err_remove),
> .remove = __devexit_p(mv64x60_pci_err_remove),
> .remove = __devexit_p(max7301_remove),
> .remove = __devexit_p(bbc_remove),
> .remove = __devexit_p(grover_remove),
> .remove = __exit_p(pxa_camera_remove),
> .remove = __devexit_p(asic3_remove),
> .remove = __devexit_p(ilo_remove),
> .remove = __exit_p(mxcnd_remove),
> .remove = __devexit_p(virtnet_remove),
> .remove = __devexit_p(atp870u_remove),
> .remove = __devexit_p(megaraid_detach_one),
> .remove = __devexit_p(stex_remove),
> .remove = __devexit_p(jsm_remove_one),
> .remove = __devexit_p(sc26xx_driver_remove),
> .remove = __devexit_p(spidev_remove),
> .remove = __devexit_p(vhci_hcd_remove),
> .remove = __devexit_p(virtballoon_remove),
>
> So in the patched files __(dev)?exit_p is only used to fill struct
> members. Provided this is the only usage of the respective
> functions---and I checked that---it doesn't make sense that they don't
> live in .devexit.text (or .exit.text respectively).
>
> Does it make sence for you, too?
Yes - if I understood you correct.
You already convinced me with your first mail that you had checked
that the functions was not used for anything else then the exit path.
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists