summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorDawei Li <dawei.li@shingroup.cn>2024-04-24 05:55:46 +0300
committerAndreas Larsson <andreas@gaisler.com>2024-05-08 20:42:15 +0300
commit3e4b2f08296e7ae08eae967161523d0500093646 (patch)
treeb737c169899a44753b3e0cc2913b5be3e0896a31 /arch/sparc
parentc4650ba96cb01b83cb87fb4eddc2e313ea17f4cb (diff)
downloadlinux-3e4b2f08296e7ae08eae967161523d0500093646.tar.xz
sparc/of: 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. @cpumask of irq_set_affinity() is read-only and free of change, drop unneeded cpumask var. 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-4-dawei.li@shingroup.cn Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/of_device_64.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index c350c58c7f69..f98c2901f335 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -624,10 +624,7 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
out:
nid = of_node_to_nid(dp);
if (nid != -1) {
- cpumask_t numa_mask;
-
- cpumask_copy(&numa_mask, cpumask_of_node(nid));
- irq_set_affinity(irq, &numa_mask);
+ irq_set_affinity(irq, cpumask_of_node(nid));
}
return irq;