Change in osmocom-bb[master]: cosmetic: Use INIT_LLIST_HEAD() and llist_add_tail()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Mar 7 20:05:02 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17411 )

Change subject: cosmetic: Use INIT_LLIST_HEAD() and llist_add_tail()
......................................................................

cosmetic: Use INIT_LLIST_HEAD() and llist_add_tail()

... instead of manually re-inventing them.

Change-Id: I7e0810aa7fd1daa8f9f3e46a207589a4c6da836b
---
M src/host/virt_phy/src/virt_l1_sched_simple.c
1 file changed, 2 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



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 4737135..a14a115 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 @@
 		/* 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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17411
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7e0810aa7fd1daa8f9f3e46a207589a4c6da836b
Gerrit-Change-Number: 17411
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200307/fd641125/attachment.htm>


More information about the gerrit-log mailing list