From ee26ba6e600f2c72e832889171f927aa1e3cc4c1 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 7 Mar 2020 10:18:18 +0100 Subject: cosmetic: Use INIT_LLIST_HEAD() and llist_add_tail() ... instead of manually re-inventing them. Change-Id: I7e0810aa7fd1daa8f9f3e46a207589a4c6da836b --- src/host/virt_phy/src/virt_l1_sched_simple.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/host/virt_phy/src/virt_l1_sched_simple.c b/src/host/virt_phy/src/virt_l1_sched_simple.c index 4737135c..a14a1153 100644 --- a/src/host/virt_phy/src/virt_l1_sched_simple.c +++ b/src/host/virt_phy/src/virt_l1_sched_simple.c @@ -129,12 +129,8 @@ void virt_l1_sched_schedule(struct l1_model_ms *ms, struct msgb *msg, uint32_t f /* list did not contain mframe item with needed fn */ mi_fn = talloc_zero(ms, struct virt_l1_sched_mframe_item); mi_fn->fn = fn; - /* need to manually init the struct content.... no so happy */ - mi_fn->tdma_item_list.prev = &mi_fn->tdma_item_list; - mi_fn->tdma_item_list.next = &mi_fn->tdma_item_list; - - /* TODO: check if we get an error if list is empty... */ - llist_add(&mi_fn->mframe_item_entry, mi_next->mframe_item_entry.prev); + INIT_LLIST_HEAD(&mi_fn->tdma_item_list); + llist_add_tail(&mi_fn->mframe_item_entry, &mi_next->mframe_item_entry); } ti_new = talloc_zero(mi_fn, struct virt_l1_sched_tdma_item); -- cgit v1.2.3