linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] tools/lib/traceevent: Change description of few APIs
Date: Fri, 22 Mar 2019 09:34:28 -0400	[thread overview]
Message-ID: <20190322093428.69d79ced@gandalf.local.home> (raw)
In-Reply-To: <20190322130742.13753-2-tstoyanov@vmware.com>

On Fri, 22 Mar 2019 15:07:40 +0200
Tzvetomir Stoyanov <tstoyanov@vmware.com> wrote:

> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 87494c7c619d..69af77896283 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -6386,7 +6386,7 @@ int tep_get_any_field_val(struct trace_seq *s, struct tep_event *event,
>   * @record: The record with the field name.
>   * @err: print default error if failed.
>   *
> - * Returns: 0 on success, -1 field not found, or 1 if buffer is full.
> + * Returns: 1 on success, -1 field not found, or 0 if buffer is full.

Does it?

It returns trace_seq_printf() which returns:

  > 0 on succes (the length of characters written to s)
  0 if the buffer is filled
  < 0 on error.

I don't think we want to state "1" or "-1".

>   */
>  int tep_print_num_field(struct trace_seq *s, const char *fmt,
>  			struct tep_event *event, const char *name,
> @@ -6418,7 +6418,7 @@ int tep_print_num_field(struct trace_seq *s, const char *fmt,
>   * @record: The record with the field name.
>   * @err: print default error if failed.
>   *
> - * Returns: 0 on success, -1 field not found, or 1 if buffer is full.
> + * Returns: 1 on success, -1 field not found, or 0 if buffer is full.

Same here.

-- Steve

>   */
>  int tep_print_func_field(struct trace_seq *s, const char *fmt,
>  			 struct tep_event *event, const char *name,


  reply	other threads:[~2019-03-22 13:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 13:07 [PATCH v2 0/3] Few patches, related to libtracevent APIs Tzvetomir Stoyanov
2019-03-22 13:07 ` [PATCH v2 1/3] tools/lib/traceevent: Change description of few APIs Tzvetomir Stoyanov
2019-03-22 13:34   ` Steven Rostedt [this message]
2019-03-22 13:07 ` [PATCH v2 2/3] tools/lib/traceevent: Coding style fixes Tzvetomir Stoyanov
2019-03-22 13:07 ` [PATCH v2 3/3] tools/lib/traceevent: Implement new traceevent APIs for accessing struct tep_handler fields Tzvetomir Stoyanov
2019-03-22 14:25   ` Steven Rostedt
2019-03-22 15:20   ` Steven Rostedt
2019-03-22 15:38     ` Tzvetomir Stoyanov

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=20190322093428.69d79ced@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=tstoyanov@vmware.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;
as well as URLs for NNTP newsgroup(s).