diff options
author | Andrea Parri (Microsoft) | 2020-06-17 18:46:37 +0200 |
---|---|---|
committer | Wei Liu | 2020-06-19 15:38:19 +0000 |
commit | 0a96820929f01ecf4cb1c33afe7044c301a06c2c (patch) | |
tree | 6388c9a00798641f34b0ff09f80cdea35e6f3716 /drivers/hv | |
parent | 458d090fbad59d1f849ee15e78d0471784d428b6 (diff) |
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>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/vmbus_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index de44d76c8ace..5b07c5bcb260 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -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; } |