Skip to content

Commit

Permalink
RDMA/siw: Make use of the helper macro kthread_run_on_cpu()
Browse files Browse the repository at this point in the history
Repalce kthread_create/kthread_bind/wake_up_process()
with kthread_run_on_cpu() to simplify the code.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
  • Loading branch information
caihuoqing1990 authored and intel-lab-lkp committed Oct 21, 2021
1 parent 48bdddb commit 76b9900
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/infiniband/sw/siw/siw_main.c
Expand Up @@ -98,15 +98,14 @@ static int siw_create_tx_threads(void)
continue;

siw_tx_thread[cpu] =
kthread_create(siw_run_sq, (unsigned long *)(long)cpu,
"siw_tx/%d", cpu);
kthread_run_on_cpu(siw_run_sq,
(unsigned long *)(long)cpu,
cpu, "siw_tx/%u");
if (IS_ERR(siw_tx_thread[cpu])) {
siw_tx_thread[cpu] = NULL;
continue;
}
kthread_bind(siw_tx_thread[cpu], cpu);

wake_up_process(siw_tx_thread[cpu]);
assigned++;
}
return assigned;
Expand Down

0 comments on commit 76b9900

Please sign in to comment.