diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2024-12-11 16:40:17 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2025-01-02 12:54:41 -0500 |
commit | f33f1a88cf0f379c5b8bf180a72f0217efa0422f (patch) | |
tree | c1a2869f197a3b5dd98524bac3db705696f88882 | |
parent | 0d19b96cf159ca9b0a96275cad9e41adb2726889 (diff) |
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>
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_init.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c index 872ad37e2a6e..cecc3a026762 100644 --- a/drivers/scsi/bnx2i/bnx2i_init.c +++ b/drivers/scsi/bnx2i/bnx2i_init.c @@ -415,14 +415,11 @@ static int bnx2i_cpu_online(unsigned int cpu) p = &per_cpu(bnx2i_percpu, cpu); - thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p, - cpu_to_node(cpu), - "bnx2i_thread/%d", cpu); + thread = kthread_create_on_cpu(bnx2i_percpu_io_thread, (void *)p, + cpu, "bnx2i_thread/%d"); if (IS_ERR(thread)) return PTR_ERR(thread); - /* bind thread to the cpu */ - kthread_bind(thread, cpu); p->iothread = thread; wake_up_process(thread); return 0; |