lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFj5m9KbZyeM+0h_d=KqGC5B9Vj2OOuHvdhzLXexLkctWtzKhA@mail.gmail.com>
Date: Sat, 7 Sep 2024 09:36:45 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Costa Shulyupin <costa.shul@...hat.com>
Cc: Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>, 
	Christophe Leroy <christophe.leroy@...roup.eu>, Naveen N Rao <naveen@...nel.org>, 
	Bjorn Helgaas <bhelgaas@...gle.com>, linuxppc-dev@...ts.ozlabs.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/xive: Use cpumask_intersects()

On Sat, Sep 7, 2024 at 1:50 AM Costa Shulyupin <costa.shul@...hat.com> wrote:
>
> Replace `cpumask_any_and(a, b) >= nr_cpu_ids`
> with the more readable `!cpumask_intersects(a, b)`.
>
> Signed-off-by: Costa Shulyupin <costa.shul@...hat.com>
> ---
>  arch/powerpc/sysdev/xive/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index fa01818c1972c..a6c388bdf5d08 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -726,7 +726,7 @@ static int xive_irq_set_affinity(struct irq_data *d,
>         pr_debug("%s: irq %d/0x%x\n", __func__, d->irq, hw_irq);
>
>         /* Is this valid ? */
> -       if (cpumask_any_and(cpumask, cpu_online_mask) >= nr_cpu_ids)
> +       if (!cpumask_intersects(cpumask, cpu_online_mask))
>                 return -EINVAL;

Reviewed-by: Ming Lei <ming.lei@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ