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: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20200617164642.37393-4-parri.andrea@gmail.com
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
Andrea Parri (Microsoft) 2020-06-17 18:46:37 +02:00 committed by Wei Liu
parent 458d090fba
commit 0a96820929
1 changed files with 1 additions and 1 deletions

View File

@ -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;
} }