lkml.org 
[lkml]   [2022]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 bpf-next 3/5] ftrace: introduce FTRACE_OPS_FL_SHARE_IPMODIFY
On Fri, 15 Jul 2022 21:48:21 +0000
Song Liu <songliubraving@fb.com> wrote:

> >> int register_ftrace_function(struct ftrace_ops *ops)
> >> + __releases(&direct_mutex)
> >> {
> >> + bool direct_mutex_locked;

You'll need:

bool direct_mutex_locked = false;

obviously ;-)

-- Steve

> >> int ret;
> >>
> >> ftrace_ops_init(ops);
> >>
> >> + ret = prepare_direct_functions_for_ipmodify(ops);
> >> + if (ret < 0)
> >> + return ret;
> >> +
> >> + direct_mutex_locked = ret == 1;
> >> +
> >
> > Please make the above:
> >
> > if (ret < 0)
> > return ret;
> > else if (ret == 1)
> > direct_mutex_locked = true;
> >
> > It's much easier to read that way.
>
> Thanks for the clarification!

\
 
 \ /
  Last update: 2022-07-15 23:51    [W:0.977 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site