lkml.org 
[lkml]   [2020]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 3/8] Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online()
Date
From: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Sent: Wednesday, June 17, 2020 9:47 AM
>
> 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>
> ---
> drivers/hv/vmbus_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index c3205f40d1415..452c14c656e2a 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -1702,7 +1702,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;
> }
> --
> 2.25.1

Reviewed-by: Michael Kelley <mikelley@microsoft.com>

\
 
 \ /
  Last update: 2020-06-18 17:28    [W:0.124 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site