Skip to content

Commit 82b395a

Browse files
Dawei Liandreas-gaisler
authored andcommitted
sparc/pci_msi: 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 3e4b2f0 commit 82b395a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/sparc/kernel/pci_msi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,7 @@ static int bringup_one_msi_queue(struct pci_pbm_info *pbm,
287287

288288
nid = pbm->numa_node;
289289
if (nid != -1) {
290-
cpumask_t numa_mask;
291-
292-
cpumask_copy(&numa_mask, cpumask_of_node(nid));
293-
irq_set_affinity(irq, &numa_mask);
290+
irq_set_affinity(irq, cpumask_of_node(nid));
294291
}
295292
err = request_irq(irq, sparc64_msiq_interrupt, 0,
296293
"MSIQ",

0 commit comments

Comments
 (0)