diff mbox series

[staging-next] isdn: don't mark kcapi_proc_exit as __exit

Message ID 20191216194909.1983639-1-arnd@arndb.de
State New
Headers show
Series [staging-next] isdn: don't mark kcapi_proc_exit as __exit | expand

Commit Message

Arnd Bergmann Dec. 16, 2019, 7:48 p.m. UTC
As everybody pointed out by now, my patch to clean up CAPI introduced
a link time warning, as the two parts of the capi driver are now in
one module and the exit function may need to be called in the error
path of the init function:

>> WARNING: drivers/isdn/capi/kernelcapi.o(.text+0xea4): Section mismatch in reference from the function kcapi_exit() to the function .exit.text:kcapi_proc_exit()

   The function kcapi_exit() references a function in an exit section.
   Often the function kcapi_proc_exit() has valid usage outside the exit section
   and the fix is to remove the __exit annotation of kcapi_proc_exit.

Remove the incorrect __exit annotation.

Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: kernelci.org bot <bot@kernelci.org>
Reported-by: Olof's autobuilder <build@lixom.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/isdn/capi/kcapi_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.0

Comments

Greg KH Dec. 17, 2019, 8 a.m. UTC | #1
On Mon, Dec 16, 2019 at 08:48:56PM +0100, Arnd Bergmann wrote:
> As everybody pointed out by now, my patch to clean up CAPI introduced

> a link time warning, as the two parts of the capi driver are now in

> one module and the exit function may need to be called in the error

> path of the init function:

> 

> >> WARNING: drivers/isdn/capi/kernelcapi.o(.text+0xea4): Section mismatch in reference from the function kcapi_exit() to the function .exit.text:kcapi_proc_exit()

>    The function kcapi_exit() references a function in an exit section.

>    Often the function kcapi_proc_exit() has valid usage outside the exit section

>    and the fix is to remove the __exit annotation of kcapi_proc_exit.

> 

> Remove the incorrect __exit annotation.

> 

> Reported-by: kbuild test robot <lkp@intel.com>

> Reported-by: kernelci.org bot <bot@kernelci.org>

> Reported-by: Olof's autobuilder <build@lixom.net>

> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>  drivers/isdn/capi/kcapi_proc.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


Thanks for this, now applied.

greg k-h
diff mbox series

Patch

diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c
index 2bffbb8bf271..eadbe59b3753 100644
--- a/drivers/isdn/capi/kcapi_proc.c
+++ b/drivers/isdn/capi/kcapi_proc.c
@@ -217,7 +217,7 @@  kcapi_proc_init(void)
 	proc_create("capi/driver",           0, NULL, &empty_fops);
 }
 
-void __exit
+void
 kcapi_proc_exit(void)
 {
 	remove_proc_entry("capi/driver",       NULL);