]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: bnx2i: Use kthread_create_on_cpu()
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 11 Dec 2024 15:40:17 +0000 (16:40 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Jan 2025 17:54:41 +0000 (12:54 -0500)
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>
drivers/scsi/bnx2i/bnx2i_init.c

index 872ad37e2a6eaf7314ba93e84890da76bdf7304d..cecc3a0267629c8665d70e5da6d49555a7f522a0 100644 (file)
@@ -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;