* [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run()
@ 2021-10-21 8:42 Cai Huoqing
2021-10-22 10:49 ` John Garry
0 siblings, 1 reply; 4+ messages in thread
From: Cai Huoqing @ 2021-10-21 8:42 UTC (permalink / raw)
To: caihuoqing
Cc: Saurav Kashyap, Javed Hasan, GR-QLogic-Storage-Upstream,
James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 71fa62bd3083..975512511a60 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2723,9 +2723,8 @@ static int __init bnx2fc_mod_init(void)
bg = &bnx2fc_global;
skb_queue_head_init(&bg->fcoe_rx_list);
- l2_thread = kthread_create(bnx2fc_l2_rcv_thread,
- (void *)bg,
- "bnx2fc_l2_thread");
+ l2_thread = kthread_run(bnx2fc_l2_rcv_thread,
+ (void *)bg, "bnx2fc_l2_thread");
if (IS_ERR(l2_thread)) {
rc = PTR_ERR(l2_thread);
goto free_wq;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run()
2021-10-21 8:42 [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run() Cai Huoqing
@ 2021-10-22 10:49 ` John Garry
0 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2021-10-22 10:49 UTC (permalink / raw)
To: Cai Huoqing
Cc: Saurav Kashyap, Javed Hasan, GR-QLogic-Storage-Upstream,
James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel
On 21/10/2021 09:42, Cai Huoqing wrote:
> Repalce kthread_create/wake_up_process() with kthread_run()
Replace
> to simplify the code.
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
> drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> index 71fa62bd3083..975512511a60 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> @@ -2723,9 +2723,8 @@ static int __init bnx2fc_mod_init(void)
>
> bg = &bnx2fc_global;
> skb_queue_head_init(&bg->fcoe_rx_list);
> - l2_thread = kthread_create(bnx2fc_l2_rcv_thread,
> - (void *)bg,
> - "bnx2fc_l2_thread");
> + l2_thread = kthread_run(bnx2fc_l2_rcv_thread,
> + (void *)bg, "bnx2fc_l2_thread");
> if (IS_ERR(l2_thread)) {
> rc = PTR_ERR(l2_thread);
> goto free_wq;
Are you then supposed to remove the wake_up_process() call also (not shown)?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run()
2022-01-26 1:42 Yin Xiujiang
@ 2022-02-08 4:52 ` Martin K. Petersen
0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-02-08 4:52 UTC (permalink / raw)
To: Yin Xiujiang, jejb, GR-QLogic-Storage-Upstream, skashyap, jhasan
Cc: Martin K . Petersen, linux-kernel, linux-scsi
On Wed, 26 Jan 2022 09:42:48 +0800, Yin Xiujiang wrote:
> Repalce kthread_create/wake_up_process() with kthread_run()
> to simplify the code.
>
>
Applied to 5.18/scsi-queue, thanks!
[1/1] scsi: bnx2fc: Make use of the helper macro kthread_run()
https://git.kernel.org/mkp/scsi/c/687ba48e16e4
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run()
@ 2022-01-26 1:42 Yin Xiujiang
2022-02-08 4:52 ` Martin K. Petersen
0 siblings, 1 reply; 4+ messages in thread
From: Yin Xiujiang @ 2022-01-26 1:42 UTC (permalink / raw)
To: skashyap, jhasan, GR-QLogic-Storage-Upstream, jejb, martin.petersen
Cc: linux-scsi, linux-kernel
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Yin Xiujiang <yinxiujiang@kylinos.cn>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 71fa62bd3083..5edc2b812646 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2723,14 +2723,13 @@ static int __init bnx2fc_mod_init(void)
bg = &bnx2fc_global;
skb_queue_head_init(&bg->fcoe_rx_list);
- l2_thread = kthread_create(bnx2fc_l2_rcv_thread,
+ l2_thread = kthread_run(bnx2fc_l2_rcv_thread,
(void *)bg,
"bnx2fc_l2_thread");
if (IS_ERR(l2_thread)) {
rc = PTR_ERR(l2_thread);
goto free_wq;
}
- wake_up_process(l2_thread);
spin_lock_bh(&bg->fcoe_rx_list.lock);
bg->kthread = l2_thread;
spin_unlock_bh(&bg->fcoe_rx_list.lock);
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-08 5:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 8:42 [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run() Cai Huoqing
2021-10-22 10:49 ` John Garry
2022-01-26 1:42 Yin Xiujiang
2022-02-08 4:52 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).