From: Andrea Parri (Microsoft) Date: Wed, 17 Jun 2020 16:46:37 +0000 (+0200) Subject: Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online() X-Git-Tag: v5.9-rc1~132^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a96820929f01ecf4cb1c33afe7044c301a06c2c;p=thirdparty%2Flinux.git 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) Link: https://lore.kernel.org/r/20200617164642.37393-4-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu --- diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index de44d76c8ace1..5b07c5bcb2605 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; }