Add documentation comment describing the parameters and return code for auxtrace_record__init() in util/auxtrace.c
Signed-off-by: Athira Rajeev <[email protected]> --- Changelog: v4 > v5: Addressed review comment from Namhyung: - Used original placement for __maybe_unused as "struct evlist *evlist __maybe_unused" - Added return code expectation on success case v3 -> v4: Addressed review comment from Sashiko: Update return value expectation for fail as non zero return err code. v2 -> v3: Addressed review comment from Sashiko: Update return value expectation for success and fail correctly. tools/perf/util/auxtrace.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index a224687ffbc1..a9f007d47c0b 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -896,6 +896,21 @@ int auxtrace_parse_aux_action(struct evlist *evlist) return 0; } +/** + * auxtrace_record__init - Initialize an AUX area tracing record. + * @evlist: The list of events to check for AUX area tracing event. + * @err: Pointer to an integer to store return code. + * + * This function looks through the @evlist to determine which AUX area + * tracing hardware is being used and initializes the auxtrace_record + * structure. + * + * Return: + * a) A pointer to the struct auxtrace_record with @err = 0 on success. + * b) NULL with @err = 0 if no AUX area tracing event is found/supported + * (not considered an error). + * c) NULL with non-zero @err on actual auxtrace_record__init failure. + */ struct auxtrace_record *__weak auxtrace_record__init(struct evlist *evlist __maybe_unused, int *err) { -- 2.47.3
