Re: [Tinyx-devel] [PATCH] List: change list_add_tail from define to inline function.
Status: Planning
Brought to you by:
davidcohen
From: Felipe B. <fel...@us...> - 2007-12-11 23:12:08
|
On Dec 11, 2007 7:08 PM, David Cohen <da...@gm...> wrote: Try to put a comment before signed-off-by entry so git-log will be "usable" :-p In any case, an inline is really better. > Signed-off-by: David Cohen <da...@gm...> Acked-by: Felipe Balbi <me...@fe...> > --- > include/tinyx/list.h | 12 +++++++----- > 1 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/include/tinyx/list.h b/include/tinyx/list.h > index 0272f86..55020b1 100644 > --- a/include/tinyx/list.h > +++ b/include/tinyx/list.h > @@ -22,7 +22,7 @@ struct list_head { > * > * @list: the list being initialized > */ > -static inline void init_list_head(struct list_head *list) > +static void inline init_list_head(struct list_head *list) > { > list->next = list; > list->prev = list; > @@ -32,11 +32,13 @@ static inline void init_list_head(struct list_head *list) > * list_add_tail - add a new entry at the end of the list > * > * @head: the head of the current list > - * @new: the member to insert > + * @queue: the member to insert > */ > -#define list_add_tail(head, new) \ > - (head)->next = (new)->next; \ > - (new)->next = (head); > +static void inline list_add_tail(struct list_head *head, struct list_head *queue) > +{ > + head->next = queue->next; > + queue->next = head; > +} > > /* > * list_del_tail - delete the tail from the list > -- > 1.5.3.5 > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Tinyx-devel mailing list > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tinyx-devel > -- Best Regards, Felipe Balbi fel...@us... |