Merge tag 'perf-tools-2020-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / kernel / trace / trace_output.c
index 73976de..4d18935 100644 (file)
@@ -20,7 +20,7 @@ DECLARE_RWSEM(trace_event_sem);
 
 static struct hlist_head event_hash[EVENT_HASHSIZE] __read_mostly;
 
-static int next_event_type = __TRACE_LAST_TYPE + 1;
+static int next_event_type = __TRACE_LAST_TYPE;
 
 enum print_line_t trace_print_bputs_msg_only(struct trace_iterator *iter)
 {
@@ -675,11 +675,11 @@ static LIST_HEAD(ftrace_event_list);
 static int trace_search_list(struct list_head **list)
 {
        struct trace_event *e;
-       int last = __TRACE_LAST_TYPE;
+       int next = __TRACE_LAST_TYPE;
 
        if (list_empty(&ftrace_event_list)) {
                *list = &ftrace_event_list;
-               return last + 1;
+               return next;
        }
 
        /*
@@ -687,17 +687,17 @@ static int trace_search_list(struct list_head **list)
         * lets see if somebody freed one.
         */
        list_for_each_entry(e, &ftrace_event_list, list) {
-               if (e->type != last + 1)
+               if (e->type != next)
                        break;
-               last++;
+               next++;
        }
 
        /* Did we used up all 65 thousand events??? */
-       if ((last + 1) > TRACE_EVENT_TYPE_MAX)
+       if (next > TRACE_EVENT_TYPE_MAX)
                return 0;
 
        *list = &e->list;
-       return last + 1;
+       return next;
 }
 
 void trace_event_read_lock(void)