diff mbox

[1/3] libata: remove ata_is_nodata

Message ID 1468675003-13701-2-git-send-email-hch@lst.de
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Christoph Hellwig July 16, 2016, 1:16 p.m. UTC
The only caller an just check for !ata_is_data instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/ata/libata-core.c | 2 +-
 include/linux/libata.h    | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

Comments

Sergei Shtylyov July 16, 2016, 4:10 p.m. UTC | #1
On 7/16/2016 4:16 PM, Christoph Hellwig wrote:

> The only caller an just check for !ata_is_data instead.

    s/ca/can/?

> Signed-off-by: Christoph Hellwig <hch@lst.de>

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig July 17, 2016, 1:26 a.m. UTC | #2
On Sat, Jul 16, 2016 at 07:10:27PM +0300, Sergei Shtylyov wrote:
> On 7/16/2016 4:16 PM, Christoph Hellwig wrote:
>
>> The only caller an just check for !ata_is_data instead.
>
>    s/ca/can/?

Yes.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov July 17, 2016, 11:21 a.m. UTC | #3
On 7/17/2016 4:26 AM, Christoph Hellwig wrote:

>>> The only caller an just check for !ata_is_data instead.
>>
>>    s/ca/can/?
>
> Yes.

     Sorry, I meant s/an/can/. :-)

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 522848a..0749f71 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5044,7 +5044,7 @@  static void ata_verify_xfer(struct ata_queued_cmd *qc)
 {
 	struct ata_device *dev = qc->dev;
 
-	if (ata_is_nodata(qc->tf.protocol))
+	if (!ata_is_data(qc->tf.protocol))
 		return;
 
 	if ((dev->mwdma_mask || dev->udma_mask) && ata_is_pio(qc->tf.protocol))
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 1abd669..283b6be 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1070,11 +1070,6 @@  static inline bool ata_is_atapi(u8 prot)
 	return ata_prot_flags(prot) & ATA_PROT_FLAG_ATAPI;
 }
 
-static inline bool ata_is_nodata(u8 prot)
-{
-	return !(ata_prot_flags(prot) & ATA_PROT_FLAG_DATA);
-}
-
 static inline bool ata_is_pio(u8 prot)
 {
 	return ata_prot_flags(prot) & ATA_PROT_FLAG_PIO;