Commit 6f28c4a
cpuidle: Avoid explicit cpumask allocation on stack
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.
Use cpumask_first_and_and() and cpumask_weight_and() to avoid the need
for a temporary cpumask on the stack.
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240416085454.3547175-8-dawei.li@shingroup.cn1 parent a7fb69f commit 6f28c4a
1 file changed
+3
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
| 442 | + | |
| 443 | + | |
449 | 444 | | |
450 | 445 | | |
451 | 446 | | |
| |||
626 | 621 | | |
627 | 622 | | |
628 | 623 | | |
629 | | - | |
630 | | - | |
631 | | - | |
| 624 | + | |
632 | 625 | | |
633 | 626 | | |
634 | 627 | | |
| |||
0 commit comments