Messages in this thread | | | Date | Fri, 15 Jul 2022 17:50:43 -0400 | From | Steven Rostedt <> | Subject | Re: [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!
| |