Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Kevin Hao <haokexin@gmail.com>
Cc: linux-ide@vger.kernel.org, Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH v3] libata: support the ata host which implements a queue depth less than 32
Date: Fri, 11 Jul 2014 10:51:05 -0400	[thread overview]
Message-ID: <20140711145105.GC27706@htj.dyndns.org> (raw)
In-Reply-To: <1405059026-18673-1-git-send-email-haokexin@gmail.com>

On Fri, Jul 11, 2014 at 02:10:26PM +0800, Kevin Hao wrote:
>  static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
>  {
>  	struct ata_queued_cmd *qc = NULL;
> -	unsigned int i, tag;
> +	unsigned int i, tag, max_queue;
> +
> +	max_queue = ap->scsi_host->can_queue;
> +	WARN_ON_ONCE(max_queue > ATA_MAX_QUEUE);

Let's move the WARN_ON_ONCE() to ata_host_register().  Also, let's
please update the function comment explaining why we're allocating
tags the way we do.

Other than that, it looks good to me.

Thanks.

-- 
tejun

  parent reply	other threads:[~2014-07-11 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  6:10 [PATCH v3] libata: support the ata host which implements a queue depth less than 32 Kevin Hao
2014-07-11 11:57 ` Sergei Shtylyov
2014-07-11 14:47   ` Tejun Heo
2014-07-12  0:26   ` Kevin Hao
2014-07-12  0:36     ` Sergei Shtylyov
2014-07-11 14:51 ` Tejun Heo [this message]
2014-07-12  0:27   ` Kevin Hao
2014-07-11 16:28 ` Bartlomiej Zolnierkiewicz
2014-07-11 16:33   ` Bartlomiej Zolnierkiewicz
2014-07-12  0:58     ` Kevin Hao

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=20140711145105.GC27706@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=haokexin@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    /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