From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: [PATCH v2] libata-sff: use ATAPI_{COD|IO}
Date: Fri, 2 Dec 2011 18:39:53 +0300 [thread overview]
Message-ID: <201112021839.53516.sshtylyov@ru.mvista.com> (raw)
In-Reply-To: <201112011853.28829.sshtylyov@ru.mvista.com>
atapi_pio_bytes() uses bare numbers for the ATAPI interrupt reason bits despite
these are #define'd in <linux/ata.h>.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
This patch is against the recent Linus' tree.
Changes in v2: corrected typo in the patch description.
drivers/ata/libata-sff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/ata/libata-sff.c
===================================================================
--- linux-2.6.orig/drivers/ata/libata-sff.c
+++ linux-2.6/drivers/ata/libata-sff.c
@@ -929,11 +929,11 @@ static void atapi_pio_bytes(struct ata_q
bytes = (bc_hi << 8) | bc_lo;
/* shall be cleared to zero, indicating xfer of data */
- if (unlikely(ireason & (1 << 0)))
+ if (unlikely(ireason & ATAPI_COD))
goto atapi_check;
/* make sure transfer direction matches expected */
- i_write = ((ireason & (1 << 1)) == 0) ? 1 : 0;
+ i_write = ((ireason & ATAPI_IO) == 0) ? 1 : 0;
if (unlikely(do_write != i_write))
goto atapi_check;
prev parent reply other threads:[~2011-12-02 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 15:53 [PATCH] libata-sff: use ATAPI_{COD|IO} Sergei Shtylyov
2011-12-02 15:39 ` Sergei Shtylyov [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=201112021839.53516.sshtylyov@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=jgarzik@pobox.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;
as well as URLs for NNTP newsgroup(s).