Skip to contentSkip to conversation

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

PATCH Applied Yin Xiujiang 2 participants 2 messages Jan 26, 2022 – Feb 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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

---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/bnx2fc/bnx2fc_fcoe.c +1 -2
index 71fa62bd3083..5edc2b812646 100644
@@ -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);
Signature · 1 line
2.30.0
#1 lore raw
Quoted 4 lines · Yin Xiujiang

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
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering