linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: james.bottomley@hansenpartnership.com,
	linux-scsi@vger.kernel.org, mike.miller@hp.com,
	linux-kernel@vger.kernel.org, thenzl@redhat.com,
	akpm@linux-foundation.org, smcameron@yahoo.com
Subject: Re: [PATCH] hpsa: do not re-order commands in internal queues
Date: Tue, 11 Jan 2011 18:01:20 -0500	[thread overview]
Message-ID: <20110111230120.GA24406@infradead.org> (raw)
In-Reply-To: <20110111224658.24457.62925.stgit@beardog.cce.hp.com>

> -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.

      parent reply	other threads:[~2011-01-11 23:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 22:46 [PATCH] hpsa: do not re-order commands in internal queues Stephen M. Cameron
2011-01-11 22:52 ` Stephen Cameron
2011-01-11 23:01 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110111230120.GA24406@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mike.miller@hp.com \
    --cc=scameron@beardog.cce.hp.com \
    --cc=smcameron@yahoo.com \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).