]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: qedi: Use kthread_create_on_cpu()
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 11 Dec 2024 15:40:18 +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 qedi_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-6-frederic@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedi/qedi_main.c

index 1cab66a1f4f65a69eb778626fa89a846cb7633a3..c9539897048abfc1d46634e867be690e2249c5e8 100644 (file)
@@ -1961,13 +1961,11 @@ static int qedi_cpu_online(unsigned int cpu)
        struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu);
        struct task_struct *thread;
 
-       thread = kthread_create_on_node(qedi_percpu_io_thread, (void *)p,
-                                       cpu_to_node(cpu),
-                                       "qedi_thread/%d", cpu);
+       thread = kthread_create_on_cpu(qedi_percpu_io_thread, (void *)p,
+                                      cpu, "qedi_thread/%d");
        if (IS_ERR(thread))
                return PTR_ERR(thread);
 
-       kthread_bind(thread, cpu);
        p->iothread = thread;
        wake_up_process(thread);
        return 0;