提交 0a968209 编写于 作者: A Andrea Parri (Microsoft) 提交者: Wei Liu

Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online()

A slight improvement in readability, and this does also remove one
memory access when NR_CPUS == 1!  ;-)
Signed-off-by: NAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20200617164642.37393-4-parri.andrea@gmail.comReviewed-by: NMichael Kelley <mikelley@microsoft.com>
Signed-off-by: NWei Liu <wei.liu@kernel.org>
上级 458d090f
...@@ -1716,7 +1716,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel, ...@@ -1716,7 +1716,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel,
/* No CPUs should come up or down during this. */ /* No CPUs should come up or down during this. */
cpus_read_lock(); cpus_read_lock();
if (!cpumask_test_cpu(target_cpu, cpu_online_mask)) { if (!cpu_online(target_cpu)) {
cpus_read_unlock(); cpus_read_unlock();
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册