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:
parent
458d090fba
commit
0a96820929
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue