mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: 胡连勤 <hulianqin@vivo.com>
Cc: "jikos@kernel.org" <jikos@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] apm-emulation: Make use of the helper macro kthread_run()
Date: Thu, 10 Oct 2024 11:30:47 +0200	[thread overview]
Message-ID: <2024101016-shun-disparity-c5d3@gregkh> (raw)
In-Reply-To: <TYUPR06MB62170C727B3C58B906A9ED11D2782@TYUPR06MB6217.apcprd06.prod.outlook.com>

On Thu, Oct 10, 2024 at 09:23:46AM +0000, 胡连勤 wrote:
> From: Lianqin Hu <hulianqin@vivo.com>
> 
> Repalce kthread_create/wake_up_process() with kthread_run()
> to simplify the code.
> 
> Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
> ---
>  drivers/char/apm-emulation.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c
> index e795390b070f..3c183370a5d6 100644
> --- a/drivers/char/apm-emulation.c
> +++ b/drivers/char/apm-emulation.c
> @@ -636,13 +636,12 @@ static int __init apm_init(void)
>  		return -ENODEV;
>  	}
>  
> -	kapmd_tsk = kthread_create(kapmd, NULL, "kapmd");
> +	kapmd_tsk = kthread_run(kapmd, NULL, "kapmd");
>  	if (IS_ERR(kapmd_tsk)) {
>  		ret = PTR_ERR(kapmd_tsk);
>  		kapmd_tsk = NULL;
>  		goto out;
>  	}
> -	wake_up_process(kapmd_tsk);

Do you have this hardware?  If not, I would not recommend making changes
like this without being able to test it.

thanks,

greg k-h

  reply	other threads:[~2024-10-10  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10  9:23 胡连勤
2024-10-10  9:30 ` gregkh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-21  8:38 Cai Huoqing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024101016-shun-disparity-c5d3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=hulianqin@vivo.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®