diff options
author | Dawei Li <dawei.li@shingroup.cn> | 2024-04-24 04:55:47 +0200 |
---|---|---|
committer | Andreas Larsson <andreas@gaisler.com> | 2024-05-08 19:42:15 +0200 |
commit | 82b395a2b3cdebc3688754bd289f91bdd0726710 (patch) | |
tree | 5556c2ea56e7fa14a4304caa35e6af2205b78079 | |
parent | sparc/of: Remove on-stack cpumask var (diff) | |
download | linux-82b395a2b3cdebc3688754bd289f91bdd0726710.tar.xz linux-82b395a2b3cdebc3688754bd289f91bdd0726710.zip |
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 <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-5-dawei.li@shingroup.cn
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index fc7402948b7b..acb2f83a1d5c 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c @@ -287,10 +287,7 @@ static int bringup_one_msi_queue(struct pci_pbm_info *pbm, nid = pbm->numa_node; 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)); } err = request_irq(irq, sparc64_msiq_interrupt, 0, "MSIQ", |