diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-12-09 00:15:56 +1000 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2021-12-09 11:09:01 +0100 |
commit | 33da017ae9687ed25903361895140b82a584fa3f (patch) | |
tree | f36ade98c05edfe50805307bd6a3a40caada1097 /ccan | |
parent | 9b85f7d961f21ec482559914e957ba233e29efd2 (diff) | |
download | skiboot-33da017ae9687ed25903361895140b82a584fa3f.zip skiboot-33da017ae9687ed25903361895140b82a584fa3f.tar.gz skiboot-33da017ae9687ed25903361895140b82a584fa3f.tar.bz2 |
ccan: switch list_add_before/after arguments to match upstream
Upstream ccan uses (list, existing entry, new entry) parameter ordering
rather than (list, new entry, existing entry) ordering.
Switch these to make syncing with upstream simpler.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'ccan')
-rw-r--r-- | ccan/list/list.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ccan/list/list.h b/ccan/list/list.h index 1d75dd9..6dbaabf 100644 --- a/ccan/list/list.h +++ b/ccan/list/list.h @@ -167,13 +167,13 @@ static inline void list_add(struct list_head *h, struct list_node *n) /** * list_add_before - add an entry before another entry. * @h: the list_head to add the node to (we use it for debug purposes, can be NULL) - * @n: the list_node to add to the list. * @p: the list_node of the other entry + * @n: the list_node to add to the list. * * The list_node does not need to be initialized; it will be overwritten. */ -static inline void list_add_before(struct list_head *h, struct list_node *n, - struct list_node *p) +static inline void list_add_before(struct list_head *h, struct list_node *p, + struct list_node *n) { n->next = p; n->prev = p->prev; @@ -186,13 +186,13 @@ static inline void list_add_before(struct list_head *h, struct list_node *n, /** * list_add_after - add an entry after another entry. * @h: the list_head to add the node to (we use it for debug purposes, can be NULL) - * @n: the list_node to add to the list. * @p: the list_node of the other entry + * @n: the list_node to add to the list. * * The list_node does not need to be initialized; it will be overwritten. */ -static inline void list_add_after(struct list_head *h, struct list_node *n, - struct list_node *p) +static inline void list_add_after(struct list_head *h, struct list_node *p, + struct list_node *n) { n->next = p->next; n->prev = p; |