Commit 0a968209 authored by Andrea Parri (Microsoft)'s avatar Andrea Parri (Microsoft) Committed by 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: default avatarAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20200617164642.37393-4-parri.andrea@gmail.comReviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent 458d090f
......@@ -1716,7 +1716,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel,
/* No CPUs should come up or down during this. */
cpus_read_lock();
if (!cpumask_test_cpu(target_cpu, cpu_online_mask)) {
if (!cpu_online(target_cpu)) {
cpus_read_unlock();
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment