exit/rtl8712: Replace the macro thread_exit with a simple return 0
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 20 Oct 2021 17:44:05 +0000 (12:44 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 29 Oct 2021 19:31:34 +0000 (14:31 -0500)
The macro 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 cmd_thread return instead of calling complete_and_exit.

Link: https://lkml.kernel.org/r/20211020174406.17889-19-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
drivers/staging/rtl8712/osdep_service.h
drivers/staging/rtl8712/rtl8712_cmd.c

index d33ddffb7ad9e66fcfa20f7076fd075ac77e51c1..0d9bb42cbc589eb8e5350d70e7ce98039fbf01d2 100644 (file)
@@ -37,7 +37,6 @@ struct        __queue {
 
 #define _pkt struct sk_buff
 #define _buffer unsigned char
-#define thread_exit() complete_and_exit(NULL, 0)
 
 #define _init_queue(pqueue)                            \
        do {                                            \
index e9294e1ed06ebe140339cf16983d34c419ff526c..2326aae6709e233fe8f90e1950b9e4174fc1a7ab 100644 (file)
@@ -393,7 +393,7 @@ _next:
                r8712_free_cmd_obj(pcmd);
        } while (1);
        complete(&pcmdpriv->terminate_cmdthread_comp);
-       thread_exit();
+       return 0;
 }
 
 void r8712_event_handle(struct _adapter *padapter, __le32 *peventbuf)