Skip to content

Commit 3e4b2f0

Browse files
Dawei Liandreas-gaisler
authored andcommitted
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 <[email protected]> Signed-off-by: Dawei Li <[email protected]> Reviewed-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andreas Larsson <[email protected]>
1 parent c4650ba commit 3e4b2f0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/sparc/kernel/of_device_64.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,7 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
624624
out:
625625
nid = of_node_to_nid(dp);
626626
if (nid != -1) {
627-
cpumask_t numa_mask;
628-
629-
cpumask_copy(&numa_mask, cpumask_of_node(nid));
630-
irq_set_affinity(irq, &numa_mask);
627+
irq_set_affinity(irq, cpumask_of_node(nid));
631628
}
632629

633630
return irq;

0 commit comments

Comments
 (0)