[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220715175043.03fa0d9f@gandalf.local.home>
Date: Fri, 15 Jul 2022 17:50:43 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Song Liu <songliubraving@...com>
Cc: Song Liu <song@...nel.org>, Networking <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, lkml <linux-kernel@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Kernel Team <Kernel-team@...com>,
"jolsa@...nel.org" <jolsa@...nel.org>,
"mhiramat@...nel.org" <mhiramat@...nel.org>
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@...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!
Powered by blists - more mailing lists