]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
IB/hfi1: Use for_each_online_cpu() instead of for_each_cpu()
authorFushuai Wang <wangfushuai@baidu.com>
Mon, 11 Aug 2025 06:25:34 +0000 (14:25 +0800)
committerLeon Romanovsky <leon@kernel.org>
Wed, 13 Aug 2025 11:05:40 +0000 (07:05 -0400)
Replace the opencoded for_each_cpu(cpu, cpu_online_mask) loop with the
more readable and equivalent for_each_online_cpu(cpu) macro.

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Link: https://patch.msgid.link/20250811062534.1041-1-wangfushuai@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hfi1/sdma.c

index 719b7c34e238f10a9641bda1d345dd30ae02faac..5cfa4f8fbf3d9991485dea8b105bcd979307b287 100644 (file)
@@ -990,7 +990,7 @@ ssize_t sdma_set_cpu_to_sde_map(struct sdma_engine *sde, const char *buf,
        }
 
        /* Clean up old mappings */
-       for_each_cpu(cpu, cpu_online_mask) {
+       for_each_online_cpu(cpu) {
                struct sdma_rht_node *rht_node;
 
                /* Don't cleanup sdes that are set in the new mask */