From: Qing Wang <wangqing7171@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Yeoreum Yun <yeoreum.yun@arm.com>,
Qing Wang <wangqing7171@gmail.com>
Subject: [PATCH] perf/core: Drop an unused parameter 'ctx'
Date: Wed, 7 Jan 2026 14:43:51 +0800 [thread overview]
Message-ID: <20260107064351.3682174-1-wangqing7171@gmail.com> (raw)
There is an unused parameter 'ctx' in perf_event_exit_event(), so drop it.
Fixes: a3c3c66670ce ("perf/core: Fix child_total_time_enabled accounting bug at task exit")
Signed-off-by: Qing Wang <wangqing7171@gmail.com>
---
kernel/events/core.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index dad0d3d2e85f..d4da96b3ab34 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4584,7 +4584,6 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
static void perf_remove_from_owner(struct perf_event *event);
static void perf_event_exit_event(struct perf_event *event,
- struct perf_event_context *ctx,
struct task_struct *task,
bool revoke);
@@ -4613,7 +4612,7 @@ static void perf_event_remove_on_exec(struct perf_event_context *ctx)
modified = true;
- perf_event_exit_event(event, ctx, ctx->task, false);
+ perf_event_exit_event(event, ctx->task, false);
}
raw_spin_lock_irqsave(&ctx->lock, flags);
@@ -12511,12 +12510,12 @@ int perf_pmu_register(struct pmu *_pmu, const char *name, int type)
EXPORT_SYMBOL_GPL(perf_pmu_register);
static void __pmu_detach_event(struct pmu *pmu, struct perf_event *event,
- struct perf_event_context *ctx)
+ struct task_struct *task)
{
/*
* De-schedule the event and mark it REVOKED.
*/
- perf_event_exit_event(event, ctx, ctx->task, true);
+ perf_event_exit_event(event, task, true);
/*
* All _free_event() bits that rely on event->pmu:
@@ -12555,7 +12554,7 @@ static void pmu_detach_event(struct pmu *pmu, struct perf_event *event)
struct perf_event_context *ctx;
ctx = perf_event_ctx_lock(event);
- __pmu_detach_event(pmu, event, ctx);
+ __pmu_detach_event(pmu, event, ctx->task);
perf_event_ctx_unlock(event, ctx);
scoped_guard (spinlock, &pmu->events_lock)
@@ -14096,11 +14095,9 @@ static void sync_child_event(struct perf_event *child_event,
&parent_event->child_total_time_running);
}
-static void
-perf_event_exit_event(struct perf_event *event,
- struct perf_event_context *ctx,
- struct task_struct *task,
- bool revoke)
+static void perf_event_exit_event(struct perf_event *event,
+ struct task_struct *task,
+ bool revoke)
{
struct perf_event *parent_event = event->parent;
unsigned long detach_flags = DETACH_EXIT;
@@ -14217,7 +14214,7 @@ static void perf_event_exit_task_context(struct task_struct *task, bool exit)
perf_event_task(task, ctx, 0);
list_for_each_entry_safe(child_event, next, &ctx->event_list, event_entry)
- perf_event_exit_event(child_event, ctx, exit ? task : NULL, false);
+ perf_event_exit_event(child_event, exit ? task : NULL, false);
mutex_unlock(&ctx->mutex);
--
2.34.1
next reply other threads:[~2026-01-07 6:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 6:43 Qing Wang [this message]
2026-01-08 5:19 ` [PATCH] perf/core: Drop an unused parameter 'ctx' Mi, Dapeng
2026-01-28 6:43 ` Qing Wang
2026-03-03 8:02 ` Qing Wang
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=20260107064351.3682174-1-wangqing7171@gmail.com \
--to=wangqing7171@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=yeoreum.yun@arm.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