diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 38e5cf73b9ae..2c99d1f7caf1 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2042,7 +2042,6 @@ static void ftrace_startup_enable(int command) | |||
2042 | 2042 | ||
2043 | static int ftrace_startup(struct ftrace_ops *ops, int command) | 2043 | static int ftrace_startup(struct ftrace_ops *ops, int command) |
2044 | { | 2044 | { |
2045 | bool hash_enable = true; | ||
2046 | int ret; | 2045 | int ret; |
2047 | 2046 | ||
2048 | if (unlikely(ftrace_disabled)) | 2047 | if (unlikely(ftrace_disabled)) |
@@ -2056,8 +2055,8 @@ static int ftrace_startup(struct ftrace_ops *ops, int command) | |||
2056 | command |= FTRACE_UPDATE_CALLS; | 2055 | command |= FTRACE_UPDATE_CALLS; |
2057 | 2056 | ||
2058 | ops->flags |= FTRACE_OPS_FL_ENABLED; | 2057 | ops->flags |= FTRACE_OPS_FL_ENABLED; |
2059 | if (hash_enable) | 2058 | |
2060 | ftrace_hash_rec_enable(ops, 1); | 2059 | ftrace_hash_rec_enable(ops, 1); |
2061 | 2060 | ||
2062 | ftrace_startup_enable(command); | 2061 | ftrace_startup_enable(command); |
2063 | 2062 | ||
@@ -2066,7 +2065,6 @@ static int ftrace_startup(struct ftrace_ops *ops, int command) | |||
2066 | 2065 | ||
2067 | static int ftrace_shutdown(struct ftrace_ops *ops, int command) | 2066 | static int ftrace_shutdown(struct ftrace_ops *ops, int command) |
2068 | { | 2067 | { |
2069 | bool hash_disable = true; | ||
2070 | int ret; | 2068 | int ret; |
2071 | 2069 | ||
2072 | if (unlikely(ftrace_disabled)) | 2070 | if (unlikely(ftrace_disabled)) |
@@ -2084,8 +2082,7 @@ static int ftrace_shutdown(struct ftrace_ops *ops, int command) | |||
2084 | */ | 2082 | */ |
2085 | WARN_ON_ONCE(ftrace_start_up < 0); | 2083 | WARN_ON_ONCE(ftrace_start_up < 0); |
2086 | 2084 | ||
2087 | if (hash_disable) | 2085 | ftrace_hash_rec_disable(ops, 1); |
2088 | ftrace_hash_rec_disable(ops, 1); | ||
2089 | 2086 | ||
2090 | if (!global_start_up) | 2087 | if (!global_start_up) |
2091 | ops->flags &= ~FTRACE_OPS_FL_ENABLED; | 2088 | ops->flags &= ~FTRACE_OPS_FL_ENABLED; |