lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241108184751.359237-3-irogers@google.com>
Date: Fri,  8 Nov 2024 10:47:47 -0800
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>, 
	Kan Liang <kan.liang@...ux.intel.com>, Athira Jajeev <atrajeev@...ux.vnet.ibm.com>, 
	James Clark <james.clark@...aro.org>, Dominique Martinet <asmadeus@...ewreck.org>, 
	Yang Li <yang.lee@...ux.alibaba.com>, Colin Ian King <colin.i.king@...il.com>, 
	Yang Jihong <yangjihong@...edance.com>, "Steinar H. Gunderson" <sesse@...gle.com>, 
	Oliver Upton <oliver.upton@...ux.dev>, Ilkka Koskinen <ilkka@...amperecomputing.com>, 
	Ze Gao <zegao2021@...il.com>, Weilin Wang <weilin.wang@...el.com>, 
	Ben Gainey <ben.gainey@....com>, zhaimingbing <zhaimingbing@...s.chinamobile.com>, 
	Zixian Cai <fzczx123@...il.com>, Andi Kleen <ak@...ux.intel.com>, Paran Lee <p4ranlee@...il.com>, 
	Thomas Falcon <thomas.falcon@...el.com>, linux-kernel@...r.kernel.org, 
	linux-perf-users@...r.kernel.org, 
	"Steven Rostedt (Google)" <rostedt@...dmis.org>
Subject: [PATCH v4 2/6] perf trace-event: Constify print arguments

Capture that these functions don't mutate their input.

Signed-off-by: Ian Rogers <irogers@...gle.com>
---
 tools/perf/util/trace-event-parse.c | 2 +-
 tools/perf/util/trace-event.h       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index d97830cdbd7e..9f218ba787d8 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -99,7 +99,7 @@ unsigned long long read_size(struct tep_event *event, void *ptr, int size)
 	return tep_read_number(event->tep, ptr, size);
 }
 
-void event_format__fprintf(struct tep_event *event,
+void event_format__fprintf(const struct tep_event *event,
 			   int cpu, void *data, int size, FILE *fp)
 {
 	struct tep_record record;
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 0e5133f1b910..4292977e1cbf 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -39,7 +39,7 @@ trace_event__tp_format(const char *sys, const char *name);
 
 struct tep_event *trace_event__tp_format_id(int id);
 
-void event_format__fprintf(struct tep_event *event,
+void event_format__fprintf(const struct tep_event *event,
 			   int cpu, void *data, int size, FILE *fp);
 
 int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size);
-- 
2.47.0.277.g8800431eea-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ