Subject: [PATCH AUTOSEL 4.4 041/100] isdn: don't mark kcapi_proc_exit as __exit

From: Sasha Levin <[email-masked]>
Date: Fri, 14 Feb 2020 11:23:25 -0500

From: Arnd Bergmann <[email-masked]>

[ Upstream commit b33bdf8020c94438269becc6dace9ed49257c4ba ]

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 <[email-masked]>
Reported-by: kernelci.org bot <[email-masked]>
Reported-by: Olof's autobuilder <[email-masked]>
Reported-by: Stephen Rothwell <[email-masked]>
Signed-off-by: Arnd Bergmann <[email-masked]>
Link: https://lore.kernel.org/r/[email-masked]
Signed-off-by: Greg Kroah-Hartman <[email-masked]>
Signed-off-by: Sasha Levin <[email-masked]>
---
 drivers/isdn/capi/kcapi_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c
index 68db3c5a10636..d6ca626219c93 100644
--- a/drivers/isdn/capi/kcapi_proc.c
+++ b/drivers/isdn/capi/kcapi_proc.c
@@ -309,7 +309,7 @@ kcapi_proc_init(void)
 	proc_create("capi/driver",       0, NULL, &proc_driver_ops);
 }
 
-void __exit
+void
 kcapi_proc_exit(void)
 {
 	remove_proc_entry("capi/driver",       NULL);
-- 
2.20.1