From: Namhyung Kim <namhyung@kernel.org>
To: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
mpetlan@redhat.com, tmricht@linux.ibm.com, maddy@linux.ibm.com,
irogers@google.com, linux-perf-users@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, hbathini@linux.vnet.ibm.com,
Tejas.Manhas1@ibm.com, Tanushree.Shah@ibm.com,
shivani@linux.ibm.com
Subject: Re: [PATCH V4 2/2] tools/perf: Add kernel-doc comment to auxtrace_record__init() function
Date: Sun, 3 May 2026 18:46:58 -0700 [thread overview]
Message-ID: <aff6kjIr-KL3Onuw@z2> (raw)
In-Reply-To: <20260502143237.23456-2-atrajeev@linux.ibm.com>
Hello,
On Sat, May 02, 2026 at 08:02:37PM +0530, Athira Rajeev wrote:
> Add documentation comment describing the parameters
> and return code for auxtrace_record__init() in util/auxtrace.c
>
> Using "struct evlist *evlist __maybe_unused", gives below
> warning with "scripts/kernel-doc".
>
> # ./scripts/kernel-doc -none tools/perf/util/auxtrace.c
> Warning: tools/perf/util/auxtrace.c:912 function parameter '__maybe_unused' not described in 'auxtrace_record__init'
> Warning: tools/perf/util/auxtrace.c:912 function parameter '__maybe_unused' not described in 'auxtrace_record__init'
>
> Updated parameter as "struct evlist __maybe_unused *evlist"
> With the change, there is no erros/warnings with kernel-doc
Hmm.. this is not what we used to have. I'm not sure if we want to
update them all. Maybe better to leave it for now.
>
> Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
> ---
> Changelog:
> 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 | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index a224687ffbc1..9e11cf4299b8 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -896,8 +896,23 @@ 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 on success.
I think you should mention that the this function should set *err to
zero on success.
Thanks,
Namhyung
> + * 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)
> +auxtrace_record__init(struct evlist __maybe_unused *evlist, int *err)
> {
> *err = 0;
> return NULL;
> --
> 2.47.3
>
next prev parent reply other threads:[~2026-05-04 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 14:32 [PATCH V4 1/2] powerpc tools perf: Initialize error code in auxtrace_record_init function Athira Rajeev
2026-05-02 14:32 ` [PATCH V4 2/2] tools/perf: Add kernel-doc comment to auxtrace_record__init() function Athira Rajeev
2026-05-04 1:46 ` Namhyung Kim [this message]
2026-05-04 4:16 ` Athira Rajeev
2026-05-04 5:14 ` [PATCH V4 1/2] powerpc tools perf: Initialize error code in auxtrace_record_init function Adrian Hunter
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=aff6kjIr-KL3Onuw@z2 \
--to=namhyung@kernel.org \
--cc=Tanushree.Shah@ibm.com \
--cc=Tejas.Manhas1@ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=atrajeev@linux.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpetlan@redhat.com \
--cc=shivani@linux.ibm.com \
--cc=tmricht@linux.ibm.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