exit/rtl8723bs: Replace the macro thread_exit with a simple return 0
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 20 Oct 2021 17:44:04 +0000 (12:44 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 29 Oct 2021 19:31:34 +0000 (14:31 -0500)
Every place thread_exit is called is at the end of a function started
with kthread_run.  The code in kthread_run has arranged things so a
kernel thread can just return and do_exit will be called.

So just have the threads return instead of calling complete_and_exit.

Link: https://lkml.kernel.org/r/20211020174406.17889-18-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/core/rtw_xmit.c
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
drivers/staging/rtl8723bs/include/osdep_service_linux.h

index d494c06dab967407b129f2070f883421afb6616a..8e69f9c10f5c5e06f2aee3138c0f32a10b11cc4f 100644 (file)
@@ -524,7 +524,7 @@ post_process:
        complete(&pcmdpriv->terminate_cmdthread_comp);
        atomic_set(&(pcmdpriv->cmdthd_running), false);
 
-       thread_exit();
+       return 0;
 }
 
 /*
index 79e4d7df1ef57c4260ca8b73176c67bb8c439a3a..0c357bc2478c821f89472c8bbbcf5c36d974f618 100644 (file)
@@ -2491,7 +2491,7 @@ int rtw_xmit_thread(void *context)
 
        complete(&padapter->xmitpriv.terminate_xmitthread_comp);
 
-       thread_exit();
+       return 0;
 }
 
 void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms)
index 156d6aba18ca10d91bf763ab25b05970a1eff954..2b9a41b12d1f3ca8c6554d2c64072de81fc41f34 100644 (file)
@@ -435,7 +435,7 @@ int rtl8723bs_xmit_thread(void *context)
 
        complete(&pxmitpriv->SdioXmitTerminate);
 
-       thread_exit();
+       return 0;
 }
 
 s32 rtl8723bs_mgnt_xmit(
index 3492ec1efd1e05af2a1ec919941700615a3035fc..188ed7e26550d7d98f24ff5e2388af032dafbbfc 100644 (file)
@@ -45,8 +45,6 @@
                spinlock_t      lock;
        };
 
-       #define thread_exit() complete_and_exit(NULL, 0)
-
 static inline struct list_head *get_next(struct list_head      *list)
 {
        return list->next;