From patchwork Sat Jul 16 13:16:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 649104 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rs92D58rPz9sR8 for ; Sat, 16 Jul 2016 23:16:52 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbcGPNQw (ORCPT ); Sat, 16 Jul 2016 09:16:52 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50484 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751593AbcGPNQv (ORCPT ); Sat, 16 Jul 2016 09:16:51 -0400 Received: from [61.122.36.137] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bOPSc-0002Hu-Qg; Sat, 16 Jul 2016 13:16:51 +0000 From: Christoph Hellwig 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 Message-Id: <1468675003-13701-3-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1468675003-13701-1-git-send-email-hch@lst.de> References: <1468675003-13701-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Instead we can simply check for PIO or DMA in ata_is_data. Signed-off-by: Christoph Hellwig --- 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)