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

scsi: qedi: Use kthread_create_on_cpu()

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>

authored by

Frederic Weisbecker and committed by
Martin K. Petersen
faaf18d3 f33f1a88

+2 -4
+2 -4
drivers/scsi/qedi/qedi_main.c
··· 1961 1961 struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu); 1962 1962 struct task_struct *thread; 1963 1963 1964 - thread = kthread_create_on_node(qedi_percpu_io_thread, (void *)p, 1965 - cpu_to_node(cpu), 1966 - "qedi_thread/%d", cpu); 1964 + thread = kthread_create_on_cpu(qedi_percpu_io_thread, (void *)p, 1965 + cpu, "qedi_thread/%d"); 1967 1966 if (IS_ERR(thread)) 1968 1967 return PTR_ERR(thread); 1969 1968 1970 - kthread_bind(thread, cpu); 1971 1969 p->iothread = thread; 1972 1970 wake_up_process(thread); 1973 1971 return 0;