diff options
author | Yury Norov [NVIDIA] <yury.norov@gmail.com> | 2025-06-04 15:39:38 -0400 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2025-06-26 05:19:30 -0400 |
commit | 59f7d2138591ef8f0e4e4ab5f1ab674e8181ad3a (patch) | |
tree | 46554653f94e61ffe4e25bd74f7a6991ba7fb900 /tools/perf/scripts/python/syscall-counts.py | |
parent | 16e2707cf15e09234445d40ddd76f11240be8767 (diff) |
RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask()
The function divides number of online CPUs by num_core_siblings, and
later checks the divider by zero. This implies a possibility to get
and divide-by-zero runtime error. Fix it by moving the check prior to
division. This also helps to save one indentation level.
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Link: https://patch.msgid.link/20250604193947.11834-3-yury.norov@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions