[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230302124352.6d6295a8@gandalf.local.home>
Date: Thu, 2 Mar 2023 12:43:52 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Uros Bizjak <ubizjak@...il.com>
Cc: linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v2 2/3] ring_buffer: Change some static functions to
bool
On Thu, 2 Mar 2023 17:41:28 +0100
Uros Bizjak <ubizjak@...il.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);
Powered by blists - more mailing lists