mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Yisheng Xie <xieyisheng1@huawei.com>
Cc: <mingo@redhat.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ftrace: use helper function clear_ftrace_function
Date: Tue, 30 Jan 2018 05:13:25 -0500	[thread overview]
Message-ID: <20180130051306.15f47965@vmware.local.home> (raw)
In-Reply-To: <1517273161-36355-1-git-send-email-xieyisheng1@huawei.com>

On Tue, 30 Jan 2018 08:46:01 +0800
Yisheng Xie <xieyisheng1@huawei.com> wrote:

> We have helper function clear_ftrace_function(), use it instead of hard
> code. And this should not have any functional change.
> 
> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
> ---
>  kernel/trace/ftrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 554b517..ba78e03 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -6779,7 +6779,7 @@ int unregister_ftrace_function(struct ftrace_ops *ops)
>  
>  	} else {
>  		/* stopping ftrace calls (just send to ftrace_stub) */
> -		ftrace_trace_function = ftrace_stub;
> +		clear_ftrace_function();
>  
>  		ftrace_shutdown_sysctl();
>  	}

Honestly, I rather nuke that function and clear_ftrace_function_probe()
along with it. They are not used outside of ftrace.c and they don't
actually help.

-- Steve

  reply	other threads:[~2018-01-30 10:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30  0:46 Yisheng Xie
2018-01-30 10:13 ` Steven Rostedt [this message]
2018-01-30 11:39   ` Yisheng Xie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180130051306.15f47965@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=xieyisheng1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®