Messages in this thread | | | Date | Thu, 2 Mar 2023 12:43:52 -0500 | From | Steven Rostedt <> | 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@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);
| |