linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: tj@kernel.org
Cc: linux-ide@vger.kernel.org
Subject: [PATCH 2/3] libata: remove ATA_PROT_FLAG_DATA
Date: Sat, 16 Jul 2016 22:16:42 +0900	[thread overview]
Message-ID: <1468675003-13701-3-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1468675003-13701-1-git-send-email-hch@lst.de>

Instead we can simply check for PIO or DMA in ata_is_data.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/libata.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index 283b6be..5838fbf 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -149,7 +149,6 @@ enum {
 	/* protocol flags */
 	ATA_PROT_FLAG_PIO	= (1 << 0), /* is PIO */
 	ATA_PROT_FLAG_DMA	= (1 << 1), /* is DMA */
-	ATA_PROT_FLAG_DATA	= ATA_PROT_FLAG_PIO | ATA_PROT_FLAG_DMA,
 	ATA_PROT_FLAG_NCQ	= (1 << 2), /* is NCQ */
 	ATA_PROT_FLAG_ATAPI	= (1 << 3), /* is ATAPI */
 
@@ -1087,7 +1086,7 @@ static inline bool ata_is_ncq(u8 prot)
 
 static inline bool ata_is_data(u8 prot)
 {
-	return ata_prot_flags(prot) & ATA_PROT_FLAG_DATA;
+	return ata_prot_flags(prot) & (ATA_PROT_FLAG_PIO | ATA_PROT_FLAG_DMA);
 }
 
 static inline int is_multi_taskfile(struct ata_taskfile *tf)
-- 
2.1.4


  parent reply	other threads:[~2016-07-16 13:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16 13:16 protocol flag cleanups Christoph Hellwig
2016-07-16 13:16 ` [PATCH 1/3] libata: remove ata_is_nodata Christoph Hellwig
2016-07-16 16:10   ` Sergei Shtylyov
2016-07-17  1:26     ` Christoph Hellwig
2016-07-17 11:21       ` Sergei Shtylyov
2016-07-16 13:16 ` Christoph Hellwig [this message]
2016-07-16 13:16 ` [PATCH 3/3] ata: define ATA_PROT_* in terms of ATA_PROT_FLAG_* Christoph Hellwig
2016-07-19  0:56 ` protocol flag cleanups Tejun Heo

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=1468675003-13701-3-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@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).