RDMA: hfi1: simplify hfi1_get_proc_affinity()
authorYury Norov [NVIDIA] <yury.norov@gmail.com>
Wed, 4 Jun 2025 19:39:42 +0000 (15:39 -0400)
committerLeon Romanovsky <leon@kernel.org>
Thu, 26 Jun 2025 09:19:48 +0000 (05:19 -0400)
commit3ad8fb8afd843a4e3380690ed7b9822d9cf26d76
tree4f7ce58e8e7c5aaca9b0fbe2585d150871ba288f
parent4ea9f618d73466234eeadf78c3a054d086c916af
RDMA: hfi1: simplify hfi1_get_proc_affinity()

The function protects the for loop with affinity->num_core_siblings > 0
condition, which is redundant because the loop will break immediately in
that case.

Drop it and save one indentation level.

Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Link: https://patch.msgid.link/20250604193947.11834-7-yury.norov@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hfi1/affinity.c