Commit 687ba48e authored by Yin Xiujiang's avatar Yin Xiujiang Committed by Martin K. Petersen

scsi: bnx2fc: Make use of the helper macro kthread_run()

Repalce kthread_create/wake_up_process() with kthread_run() to simplify the
code.

Link: https://lore.kernel.org/r/20220126014248.466806-1-yinxiujiang@kylinos.cnSigned-off-by: default avatarYin Xiujiang <yinxiujiang@kylinos.cn>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dd84a4b0
......@@ -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,
(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;
}
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment