Skip to content

Commit

Permalink
exit/rtl8723bs: Replace the macro thread_exit with a simple return 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman committed Oct 29, 2021
1 parent 695dd0d commit 501c887
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/core/rtw_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ int rtw_cmd_thread(void *context)
complete(&pcmdpriv->terminate_cmdthread_comp);
atomic_set(&(pcmdpriv->cmdthd_running), false);

thread_exit();
return 0;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/core/rtw_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ int rtl8723bs_xmit_thread(void *context)

complete(&pxmitpriv->SdioXmitTerminate);

thread_exit();
return 0;
}

s32 rtl8723bs_mgnt_xmit(
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/rtl8723bs/include/osdep_service_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 501c887

Please sign in to comment.