mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] IB/hfi1: Use for_each_online_cpu() instead of for_each_cpu()
@ 2025-08-11  6:25 Fushuai Wang
  2025-08-13 11:06 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Fushuai Wang @ 2025-08-11  6:25 UTC (permalink / raw)
  To: linux-kernel, linux-rdma; +Cc: dennis.dalessandro, jgg, leon, Fushuai Wang

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>
---
 drivers/infiniband/hw/hfi1/sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c
index 719b7c34e238..5cfa4f8fbf3d 100644
--- a/drivers/infiniband/hw/hfi1/sdma.c
+++ b/drivers/infiniband/hw/hfi1/sdma.c
@@ -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 */
-- 
2.36.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] IB/hfi1: Use for_each_online_cpu() instead of for_each_cpu()
  2025-08-11  6:25 [PATCH] IB/hfi1: Use for_each_online_cpu() instead of for_each_cpu() Fushuai Wang
@ 2025-08-13 11:06 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2025-08-13 11:06 UTC (permalink / raw)
  To: linux-kernel, linux-rdma, Fushuai Wang; +Cc: dennis.dalessandro, jgg


On Mon, 11 Aug 2025 14:25:34 +0800, Fushuai Wang wrote:
> Replace the opencoded for_each_cpu(cpu, cpu_online_mask) loop with the
> more readable and equivalent for_each_online_cpu(cpu) macro.
> 
> 

Applied, thanks!

[1/1] IB/hfi1: Use for_each_online_cpu() instead of for_each_cpu()
      https://git.kernel.org/rdma/rdma/c/211dc59b7bb5ea

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-13 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11  6:25 [PATCH] IB/hfi1: Use for_each_online_cpu() instead of for_each_cpu() Fushuai Wang
2025-08-13 11:06 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®