Commit 3ad8fb8a authored by Yury Norov [NVIDIA]'s avatar Yury Norov [NVIDIA] Committed by Leon Romanovsky
Browse files

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: default avatarYury Norov [NVIDIA] <yury.norov@gmail.com>
Link: https://patch.msgid.link/20250604193947.11834-7-yury.norov@gmail.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 4ea9f618
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -1069,7 +1069,6 @@ int hfi1_get_proc_affinity(int node)
	 * If HT cores are enabled, identify which HW threads within the
	 * physical cores should be used.
	 */
	if (affinity->num_core_siblings > 0) {
	for (i = 0; i < affinity->num_core_siblings; i++) {
		find_hw_thread_mask(i, hw_thread_mask, affinity);

@@ -1085,7 +1084,6 @@ int hfi1_get_proc_affinity(int node)
		if (!cpumask_empty(diff))
			break;
	}
	}
	hfi1_cdbg(PROC, "Same available HW thread on all physical CPUs: %*pbl",
		  cpumask_pr_args(hw_thread_mask));