sparc/irq: Remove on-stack cpumask var
authorDawei Li <dawei.li@shingroup.cn>
Wed, 24 Apr 2024 02:55:45 +0000 (10:55 +0800)
committerAndreas Larsson <andreas@gaisler.com>
Wed, 8 May 2024 17:42:15 +0000 (19:42 +0200)
commitc4650ba96cb01b83cb87fb4eddc2e313ea17f4cb
tree085fe412425f1814c70acc2990c313ff1614e541
parent7aba3a85daee7d81fbdbccc9d3d9a27dbd4b45aa
sparc/irq: Remove on-stack cpumask var

In general it's preferable to avoid placing cpumasks on the stack, as
for large values of NR_CPUS these can consume significant amounts of
stack space and make stack overflows more likely.

- Both 2 arguments of cpumask_equal() is constant and free of change, no
  need to allocate extra cpumask variables.

- Merge cpumask_and(), cpumask_first() and cpumask_empty() into
  cpumask_first_and().

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20240424025548.3765250-3-dawei.li@shingroup.cn
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/kernel/irq_64.c