lkml.org 
[lkml]   [2023]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/3] ring_buffer: Change some static functions to bool
On Fri, 3 Mar 2023 22:04:01 +0530
Mukesh Ojha <quic_mojha@quicinc.com> wrote:

> > static __always_inline void
> > @@ -5408,9 +5407,8 @@ bool ring_buffer_empty(struct trace_buffer *buffer)
> > {
> > struct ring_buffer_per_cpu *cpu_buffer;
> > unsigned long flags;
> > - bool dolock;
> > + bool dolock, ret;
> > int cpu;
> > - int ret;
>
> nit: would have been nice if you would not have changed existing stuff
> i.e each variable on a separate line.

I agree. I prefer each variable on a separate line, as it makes fixing
"unused variable" warnings easier.

-- Steve


>
> >
> > /* yes this is racy, but if you don't like the race, lock the buffer */
> > for_each_buffer_cpu(buffer, cpu) {
> > @@ -5438,8 +5436,7 @@ bool ring_buffer_empty_cpu(struct trace_buffer *buffer, int cpu)
> > {
> > struct ring_buffer_per_cpu *cpu_buffer;
> > unsigned long flags;
> > - bool dolock;
> > - int ret;
> > + bool dolock, ret;
>
> same here

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