linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Slavomir Kaslev <kaslevs@vmware.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "linux-trace-devel@vger.kernel.org" 
	<linux-trace-devel@vger.kernel.org>,
	Tzvetomir Stoyanov <tstoyanov@vmware.com>,
	Yordan Karadzhov <ykaradzhov@vmware.com>
Subject: Re: [PATCH 6/8] trace-cmd: Make tracecmd_msg_send_close return error code if any
Date: Thu, 7 Feb 2019 12:52:03 +0000	[thread overview]
Message-ID: <CAE0o1Nuafu4H2fjf6oskCuCuXk-BB5y5D+Y0S-6mWfsYT9GPPw@mail.gmail.com> (raw)
In-Reply-To: <20190205101449.6d7ed6d2@gandalf.local.home>

On Tue, Feb 5, 2019 at 5:14 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon,  4 Feb 2019 09:08:53 +0200
> Slavomir Kaslev <kaslevs@vmware.com> wrote:
>
> I accepted your patches up to here with some slight modifications to
> the subjects and change logs. Note, when referencing function names,
> its mostly desirable to add a "()" to the end of them to make it stand
> out that they are functions. Like tracecmd_msg_send_close().
>
> But, this patch needs a change log to explain why this function should
> return an error code. Is something going to rely on it in the future?

Apologies for the empty commit message on this one, somehow it slipped
me before sending.

The intention for this patch was simply stylistic, as with close()
which returns error code but it's seldom checked.

Feel free to drop it if you find that unnecessary. Patch 7 and 8 don't
depend on it. Should I resend them?

-- Slavi


>
> -- Steve
>
>
>
> > Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
> > ---
> >  include/trace-cmd/trace-cmd.h | 2 +-
> >  tracecmd/trace-msg.c          | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
> > index 33f352b..0ab23f6 100644
> > --- a/include/trace-cmd/trace-cmd.h
> > +++ b/include/trace-cmd/trace-cmd.h
> > @@ -318,7 +318,7 @@ int tracecmd_msg_send_init_data(struct tracecmd_msg_handle *msg_handle,
> >  int tracecmd_msg_data_send(struct tracecmd_msg_handle *msg_handle,
> >                              const char *buf, int size);
> >  int tracecmd_msg_finish_sending_data(struct tracecmd_msg_handle *msg_handle);
> > -void tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle);
> > +int tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle);
> >
> >  /* for server */
> >  int tracecmd_msg_initial_setting(struct tracecmd_msg_handle *msg_handle);
> > diff --git a/tracecmd/trace-msg.c b/tracecmd/trace-msg.c
> > index b4b58d4..c24424b 100644
> > --- a/tracecmd/trace-msg.c
> > +++ b/tracecmd/trace-msg.c
> > @@ -549,12 +549,12 @@ int tracecmd_msg_send_port_array(struct tracecmd_msg_handle *msg_handle,
> >       return 0;
> >  }
> >
> > -void tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle)
> > +int tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle)
> >  {
> >       struct tracecmd_msg msg;
> >
> >       tracecmd_msg_init(MSG_CLOSE, &msg);
> > -     tracecmd_msg_send(msg_handle->fd, &msg);
> > +     return tracecmd_msg_send(msg_handle->fd, &msg);
> >  }
> >
> >  int tracecmd_msg_data_send(struct tracecmd_msg_handle *msg_handle,
>

  reply	other threads:[~2019-02-07 12:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  7:08 [PATCH 0/8] trace-cmd protocol fixes Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 1/8] trace-cmd: Remove unused global variable Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 2/8] trace-cmd: Rename error_operation_for_server Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 3/8] trace-cmd: Remove tracecmd_msg_handle/tracecmd_msg_server distinction Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 4/8] trace-cmd: Check if connection is done when reading data in tracecmd_msg_read_data Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 5/8] trace-cmd: Fix a memory leak in tracecmd_msg_send_init_data Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 6/8] trace-cmd: Make tracecmd_msg_send_close return error code if any Slavomir Kaslev
2019-02-05 15:14   ` Steven Rostedt
2019-02-07 12:52     ` Slavomir Kaslev [this message]
2019-02-07 14:41       ` Steven Rostedt
2019-02-08 19:34     ` Steven Rostedt
2019-02-04  7:08 ` [PATCH 7/8] trace-cmd: Add tracecmd_msg_wait_close function Slavomir Kaslev
2019-02-04  7:08 ` [PATCH 8/8] trace-cmd: Acknowledge unexpected protocol messages Slavomir Kaslev

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=CAE0o1Nuafu4H2fjf6oskCuCuXk-BB5y5D+Y0S-6mWfsYT9GPPw@mail.gmail.com \
    --to=kaslevs@vmware.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tstoyanov@vmware.com \
    --cc=ykaradzhov@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).