From 33427b4cd322b68863a0b7c895acde6e2872b801 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 8 Jul 2018 15:23:56 +0200 Subject: [PATCH] small cleanups --- spa/include/spa/graph/graph.h | 9 ++++----- src/pipewire/link.c | 10 ---------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/spa/include/spa/graph/graph.h b/spa/include/spa/graph/graph.h index 70e20bef6..000ec80fa 100644 --- a/spa/include/spa/graph/graph.h +++ b/spa/include/spa/graph/graph.h @@ -62,11 +62,10 @@ static inline int spa_graph_link_trigger(struct spa_graph_link *link) { struct spa_graph_state *state = link->state; - if (state->pending == 0) { - spa_debug("link %p: state %p: nothing pending", link, state); - } else { - spa_debug("link %p: state %p: pending %d required %d", link, state, - state->pending, state->required); + spa_debug("link %p: state %p: pending %d required %d", link, state, + state->pending, state->required); + + if (state->pending != 0) { if (__atomic_sub_fetch(&state->pending, 1, __ATOMIC_SEQ_CST) == 0) spa_graph_link_signal(link); } diff --git a/src/pipewire/link.c b/src/pipewire/link.c index bb8ad5133..6ea3292fe 100644 --- a/src/pipewire/link.c +++ b/src/pipewire/link.c @@ -1138,16 +1138,6 @@ static const struct pw_node_events output_node_events = { .async_complete = output_node_async_complete, }; -static inline void -move_graph(struct spa_graph *dst, struct spa_graph *src) -{ - struct spa_graph_node *n, *t; - spa_list_for_each_safe(n, t, &src->nodes, link) { - spa_graph_node_remove(n); - spa_graph_node_add(dst, n); - } -} - static int find_driver(struct pw_link *this) { struct pw_node *out_driver, *in_driver;