aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorAndrew Jones <[email protected]>2022-10-14 17:58:44 +0200
committerPalmer Dabbelt <[email protected]>2022-10-27 15:23:19 -0700
commitd14e99bf95510fa2d6affc371ad68161afc1dc8e (patch)
tree5d96fff7ad69836db03f8cce8fcd09bc6e41250e /lib/mpi/mpi-sub-ui.c
parent952b64d6665c8b6fdd13ba63be7adc3be51641d7 (diff)
RISC-V: Fix /proc/cpuinfo cpumask warning
Commit 78e5a3399421 ("cpumask: fix checking valid cpu range") has started issuing warnings[*] when cpu indices equal to nr_cpu_ids - 1 are passed to cpumask_next* functions. seq_read_iter() and cpuinfo's start and next seq operations implement a pattern like n = cpumask_next(n - 1, mask); show(n); while (1) { ++n; n = cpumask_next(n - 1, mask); if (n >= nr_cpu_ids) break; show(n); } which will issue the warning when reading /proc/cpuinfo. Ensure no warning is generated by validating the cpu index before calling cpumask_next(). [*] Warnings will only appear with DEBUG_PER_CPU_MAPS enabled. Signed-off-by: Andrew Jones <[email protected]> Reviewed-by: Anup Patel <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Tested-by: Conor Dooley <[email protected]> Acked-by: Yury Norov <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Fixes: 78e5a3399421 ("cpumask: fix checking valid cpu range") Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions