lkml.org 
[lkml]   [2011]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hpsa: do not re-order commands in internal queues
> -static inline void addQ(struct hlist_head *list, struct CommandList *c)
> +static inline void addQ(struct list_head *list, struct CommandList *c)
> {
> - hlist_add_head(&c->list, list);
> + list_add_tail(&c->list, list);
> }
>
> static inline u32 next_command(struct ctlr_info *h)
> @@ -366,9 +366,9 @@ static void enqueue_cmd_and_start_io(struct ctlr_info *h,
>
> static inline void removeQ(struct CommandList *c)
> {
> - if (WARN_ON(hlist_unhashed(&c->list)))
> + if (WARN_ON(list_empty(&c->list)))
> return;
> - hlist_del_init(&c->list);
> + list_del_init(&c->list);

Any reason to keep these helpers? They don't really help
clarifying the code, and iterations also use the list directly, thus
breaking the abstraction.


\
 
 \ /
  Last update: 2011-01-12 00:03    [W:0.135 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site