Skip to content

Commit 0a96820

Browse files
andrea-parriliuw
authored andcommitted
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>
1 parent 458d090 commit 0a96820

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hv/vmbus_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel,
17161716
/* No CPUs should come up or down during this. */
17171717
cpus_read_lock();
17181718

1719-
if (!cpumask_test_cpu(target_cpu, cpu_online_mask)) {
1719+
if (!cpu_online(target_cpu)) {
17201720
cpus_read_unlock();
17211721
return -EINVAL;
17221722
}

0 commit comments

Comments
 (0)