Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdce6a4e authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf tools: Remove redundant initialization of thread linkage members

A thread moves from a rb tree to a list, but can't be on both, because
those linkage members are in a union. This is leftover from when I was
debugging thread refcounting and had nuked that union.

It is harmless duplication, as RB_CLEAR_NODE() does again what
INIT_LIST_HEAD does.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-hmma9lmip6qlhzhgkhp9tzd1@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4d4dee9a
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -54,7 +54,6 @@ struct thread *thread__new(pid_t pid, pid_t tid)


		list_add(&comm->list, &thread->comm_list);
		list_add(&comm->list, &thread->comm_list);
		atomic_set(&thread->refcnt, 0);
		atomic_set(&thread->refcnt, 0);
		INIT_LIST_HEAD(&thread->node);
		RB_CLEAR_NODE(&thread->rb_node);
		RB_CLEAR_NODE(&thread->rb_node);
	}
	}


@@ -70,7 +69,6 @@ void thread__delete(struct thread *thread)
	struct comm *comm, *tmp;
	struct comm *comm, *tmp;


	BUG_ON(!RB_EMPTY_NODE(&thread->rb_node));
	BUG_ON(!RB_EMPTY_NODE(&thread->rb_node));
	BUG_ON(!list_empty(&thread->node));


	thread_stack__free(thread);
	thread_stack__free(thread);