public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Fushuai Wang <wangfushuai@baidu.com>
Subject: [for-next][PATCH 04/11] tracing/osnoise: Use for_each_online_cpu() instead of for_each_cpu()
Date: Tue, 30 Sep 2025 13:01:39 -0400	[thread overview]
Message-ID: <20250930170301.869001194@kernel.org> (raw)
In-Reply-To: 20250930170135.285740909@kernel.org

From: Fushuai Wang <wangfushuai@baidu.com>

Replace the opencoded for_each_cpu(cpu, cpu_online_mask) loop with the
more readable and equivalent for_each_online_cpu(cpu) macro.

Link: https://lore.kernel.org/20250811064158.2456-1-wangfushuai@baidu.com
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 kernel/trace/trace_osnoise.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index fd259da0aa64..4cb464894faf 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -271,7 +271,7 @@ static inline void tlat_var_reset(void)
 	 * So far, all the values are initialized as 0, so
 	 * zeroing the structure is perfect.
 	 */
-	for_each_cpu(cpu, cpu_online_mask) {
+	for_each_online_cpu(cpu) {
 		tlat_var = per_cpu_ptr(&per_cpu_timerlat_var, cpu);
 		if (tlat_var->kthread)
 			hrtimer_cancel(&tlat_var->timer);
@@ -295,7 +295,7 @@ static inline void osn_var_reset(void)
 	 * So far, all the values are initialized as 0, so
 	 * zeroing the structure is perfect.
 	 */
-	for_each_cpu(cpu, cpu_online_mask) {
+	for_each_online_cpu(cpu) {
 		osn_var = per_cpu_ptr(&per_cpu_osnoise_var, cpu);
 		memset(osn_var, 0, sizeof(*osn_var));
 	}
-- 
2.50.1



  parent reply	other threads:[~2025-09-30 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30 17:01 [for-next][PATCH 00/11] tracing: Updates for v6.18 Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 01/11] tracing: Replace syscall RCU pointer assignment with READ/WRITE_ONCE() Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 02/11] tracing: Have syscall trace events show "0x" for values greater than 10 Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 03/11] tracing: Use vmalloc_array() to improve code Steven Rostedt
2025-09-30 17:01 ` Steven Rostedt [this message]
2025-09-30 17:01 ` [for-next][PATCH 05/11] tracing: Move buffer in trace_seq to end of struct Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 06/11] tracing: Remove redundant 0 value initialization Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 07/11] tracing: replace use of system_wq with system_percpu_wq Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 08/11] tracing/osnoise: Replace kmalloc() + copy_from_user() with memdup_user() Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 09/11] ftrace: Fix softlockup in ftrace_module_enable Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 10/11] tracing: Ensure optimized hashing works Steven Rostedt
2025-09-30 17:01 ` [for-next][PATCH 11/11] tracing: Fix lock imbalance in s_start() memory allocation failure path Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250930170301.869001194@kernel.org \
    --to=rostedt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=wangfushuai@baidu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox