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) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Michael Kelley <[email protected]> Signed-off-by: Wei Liu <[email protected]>
1 parent 458d090 commit 0a96820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)