All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH v2 2/3] ring_buffer: Change some static functions to bool
Date: Thu, 2 Mar 2023 12:43:52 -0500	[thread overview]
Message-ID: <20230302124352.6d6295a8@gandalf.local.home> (raw)
In-Reply-To: <20230302164129.4862-3-ubizjak@gmail.com>

On Thu,  2 Mar 2023 17:41:28 +0100
Uros Bizjak <ubizjak@gmail.com> wrote:

> -static int
> +static bool
>  rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer)
>  {
>  	struct list_head *pages = &cpu_buffer->new_pages;
> -	int retries, success;
> +	int retries;
>  	unsigned long flags;
> +	bool success;

Nit, but I prefer to keep the "upside-down xmas-tree" format:

That is, instead of:

  	struct list_head *pages = &cpu_buffer->new_pages;
	int retries;
 	unsigned long flags;
	bool success;

Have

  	struct list_head *pages = &cpu_buffer->new_pages;
 	unsigned long flags;
	bool success;
	int retries;

It's easier to read, and looks cleaner.

-- Steve

>  
>  	/* Can be called at early boot up, where interrupts must not been enabled */
>  	raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);

  reply	other threads:[~2023-03-02 17:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 16:41 [PATCH v2 0/3] Improve trace/ring_buffer.c Uros Bizjak
2023-03-02 16:41 ` [PATCH v2 1/3] ring_buffer: Change some static functions to void Uros Bizjak
2023-03-02 16:41 ` [PATCH v2 2/3] ring_buffer: Change some static functions to bool Uros Bizjak
2023-03-02 17:43   ` Steven Rostedt [this message]
2023-03-02 16:41 ` [PATCH v2 3/3] ring_buffer: Use try_cmpxchg instead of cmpxchg Uros Bizjak
2023-03-02 17:19 ` [PATCH v2 0/3] Improve trace/ring_buffer.c 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=20230302124352.6d6295a8@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.