lkml.org 
[lkml]   [2023]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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);

\
 
 \ /
  Last update: 2023-03-27 00:42    [W:0.074 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site