Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: bnx2i: Use kthread_create_on_cpu()

Use the proper API instead of open coding it.

However it looks like bnx2i_percpu_io_thread() kthread could be replaced by
the use of a high prio workqueue instead.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20241211154035.75565-5-frederic@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Frederic Weisbecker and committed by
Martin K. Petersen
f33f1a88 0d19b96c

+2 -5
+2 -5
drivers/scsi/bnx2i/bnx2i_init.c
··· 415 415 416 416 p = &per_cpu(bnx2i_percpu, cpu); 417 417 418 - thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p, 419 - cpu_to_node(cpu), 420 - "bnx2i_thread/%d", cpu); 418 + thread = kthread_create_on_cpu(bnx2i_percpu_io_thread, (void *)p, 419 + cpu, "bnx2i_thread/%d"); 421 420 if (IS_ERR(thread)) 422 421 return PTR_ERR(thread); 423 422 424 - /* bind thread to the cpu */ 425 - kthread_bind(thread, cpu); 426 423 p->iothread = thread; 427 424 wake_up_process(thread); 428 425 return 0;