diff mbox series

parisc: Make use of the helper macro kthread_run()

Message ID 20211021084214.2289-1-caihuoqing@baidu.com (mailing list archive)
State Accepted, archived
Headers show
Series parisc: Make use of the helper macro kthread_run() | expand

Commit Message

Cai,Huoqing Oct. 21, 2021, 8:42 a.m. UTC
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 arch/parisc/kernel/pdt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Helge Deller Oct. 21, 2021, 12:12 p.m. UTC | #1
On 10/21/21 10:42, Cai Huoqing wrote:
> Repalce kthread_create/wake_up_process() with kthread_run()
> to simplify the code.
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

Thanks, applied.

Helge


>  arch/parisc/kernel/pdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
> index fcc761b0e11b..e391b175f5ec 100644
> --- a/arch/parisc/kernel/pdt.c
> +++ b/arch/parisc/kernel/pdt.c
> @@ -352,12 +352,10 @@ static int __init pdt_initcall(void)
>  	if (pdt_type == PDT_NONE)
>  		return -ENODEV;
>
> -	kpdtd_task = kthread_create(pdt_mainloop, NULL, "kpdtd");
> +	kpdtd_task = kthread_run(pdt_mainloop, NULL, "kpdtd");
>  	if (IS_ERR(kpdtd_task))
>  		return PTR_ERR(kpdtd_task);
>
> -	wake_up_process(kpdtd_task);
> -
>  	return 0;
>  }
>
>
diff mbox series

Patch

diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
index fcc761b0e11b..e391b175f5ec 100644
--- a/arch/parisc/kernel/pdt.c
+++ b/arch/parisc/kernel/pdt.c
@@ -352,12 +352,10 @@  static int __init pdt_initcall(void)
 	if (pdt_type == PDT_NONE)
 		return -ENODEV;
 
-	kpdtd_task = kthread_create(pdt_mainloop, NULL, "kpdtd");
+	kpdtd_task = kthread_run(pdt_mainloop, NULL, "kpdtd");
 	if (IS_ERR(kpdtd_task))
 		return PTR_ERR(kpdtd_task);
 
-	wake_up_process(kpdtd_task);
-
 	return 0;
 }