mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Uros Bizjak <ubizjak@gmail.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] ring_buffer: Change some static functions to void
Date: Fri, 3 Mar 2023 08:57:23 +0900	[thread overview]
Message-ID: <20230303085723.53182d1576737f93dc46fc92@kernel.org> (raw)
In-Reply-To: <20230301113416.7526d858@gandalf.local.home>

On Wed, 1 Mar 2023 11:34:16 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 1 Mar 2023 09:46:50 +0100
> Uros Bizjak <ubizjak@gmail.com> wrote:
> 
> > On Tue, Feb 28, 2023 at 11:55 PM Masami Hiramatsu <mhiramat@kernel.org> wrote:
> > >
> > > On Tue, 28 Feb 2023 18:59:27 +0100
> > > Uros Bizjak <ubizjak@gmail.com> wrote:
> > >  
> > > > The results of some static functions are not used. Change the
> > > > type of these function to void and remove unnecessary returns.
> > > >
> > > > No functional change intended.  
> > >
> > > NAK, instead of dropping the errors, please handle it on the caller side.  
> > 
> > I was under the impression that the intention of these two functions
> > is to warn if there is any corruption in data pages detected. Please
> > note that the patch has no effect on code size, as the compiler is
> > smart enough to drop unused return values by itself. So, the change is
> > mostly cosmetic as I was just bothered by unused returns. I'm not
> > versed enough in the code to introduce additional error handling, so
> > considering its minimal impact, the patch can just be dropped.
> > 
> 
> I'm not against the change.
> 
> Masami,
> 
> I don't think we need to check the return values, as when these checks
> fail, it triggers RB_WARN_ON() which disables the ring buffer involved, and
> that should stop further progress of other calls to the affected ring
> buffer.

Ah, so the RB_WARN_ON() has a side effect which stops all further operations.
OK, I got it.

Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

> 
> -- Steve
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2023-03-02 23:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 17:59 [PATCH 0/3] Improve trace/ring_buffer.c Uros Bizjak
2023-02-28 17:59 ` [PATCH 1/3] ring_buffer: Change some static functions to void Uros Bizjak
2023-02-28 22:55   ` Masami Hiramatsu
2023-03-01  8:46     ` Uros Bizjak
2023-03-01 16:34       ` Steven Rostedt
2023-03-02 23:57         ` Masami Hiramatsu [this message]
2023-02-28 17:59 ` [PATCH 2/3] ring_buffer: Change some static functions to bool Uros Bizjak
2023-02-28 17:59 ` [PATCH 3/3] ring_buffer: Use try_cmpxchg instead of cmpxchg Uros Bizjak
2023-02-28 21:43   ` Steven Rostedt
2023-03-01  9:37     ` Uros Bizjak
2023-03-01 15:49       ` Joel Fernandes
2023-03-01 15:50         ` Joel Fernandes
2023-03-01 16:18       ` Steven Rostedt
2023-03-01 16:28         ` Steven Rostedt
2023-03-01 17:57           ` Uros Bizjak
2023-03-01 18:08           ` Uros Bizjak
2023-03-01 17:16         ` Uros Bizjak
2023-03-01 18:18           ` Steven Rostedt
2023-03-01 18:28             ` Steven Rostedt
2023-03-01 18:37               ` Uros Bizjak
2023-02-28 19:35 ` [PATCH 0/3] Improve trace/ring_buffer.c Steven Rostedt
2023-03-01  8:35   ` Uros Bizjak

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=20230303085723.53182d1576737f93dc46fc92@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=ubizjak@gmail.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

Powered by JetHome