On Wed, 26 Feb 2025 23:48:52 +0900
Masami Hiramatsu (Google) <[email protected]> wrote:

> > -   event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT,
> > -                                     sizeof(*entry), trace_ctx);
> > +   /* If fregs is defined, add FTRACE_REGS_MAX_ARGS long size words */
> > +   size = sizeof(*entry) + (FTRACE_REGS_MAX_ARGS * !!fregs * 
> > sizeof(long));  
> 
> Is `!!fregs` always 1 if fregs != NULL? (seems to depend on compiler)

Yes, C guarantees that ! is either 1 or zero. If you want to convert
something from non zero to 1, the C convention is "!!".

> 
> Others looks good to me.
> 
> Reviewed-by: Masami Hiramatsu (Google) <[email protected]>


Thanks!

-- Steve


Reply via email to