Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp442941imm; Thu, 12 Jul 2018 23:39:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeaNRgRBJMDtcUJ0OpAxAwMZ4u9xokik6fF6rjr20v62bqDJMgOJGBlUp95aX2848VnkKGR X-Received: by 2002:a17:902:8506:: with SMTP id bj6-v6mr5070455plb.210.1531463985248; Thu, 12 Jul 2018 23:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531463985; cv=none; d=google.com; s=arc-20160816; b=N8QIIUI5tS6+2dkpYtHHVMGfu/7R2BPU9MTX5s798d9N/KrSphrEnzTqjrcZSRVGBM Xt3uVnQxoJuVn1Ha+6xRPauE7Crhq7OswPJDwxTfO3FHAOkJk3jiWP5FnQ5kLGrAyjzO 1kg08tOYkE8dcN4UTYz0pUrKywu/adyyGzfwkvAgJP+1WPJRrmK17aAmHwa/2PXoWxXc A/RoxAdFk55aEBzy88f5euO1VgQ6qnP4NxAB8ylymrdRr6l/klHkYGuHMUFqQXhcwsAp t4GQoGTJbr/lVsOFP7x2+plQNJ/4LR1RmcSuuJZL+LF9ePrNK5uiqlnPwE7rTkLPR2GF 82AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=BXLX+6dT88IxG1zzcrOdsNzOo8kP+h0vYIYmjNP/sdY=; b=ngR8Uym6nHEGKtEOBMBbNAKh+awNaUtJ1rTs11QIyfNCPKGVQ6nRvbbJt940cYCPdz WwmvUFi4rSL76QHgW+V3QiZFUwbhDxJlkLC1CFuHjohAAFvNUx0CKVz8g1DonPhH4IAR F+Y8cn7XJThj0PUZGW4lNr9rZbUpoB73p3X071msRPUXtK/q407VrdlCudLYmdhVRxkC O0AuTmZ7iF/nMRJpBFYWxSfWnetFxdg4kONCfxh5GcbitTEABeTxeX8rIbj7NDm6eQvg PeUeeBPfQmJBR24HEkdr7QPKpUisL+ZAPEoX827Z+eomHPkXa6b1bLqEtDnStlzJ7To8 013g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9-v6si1938517plk.391.2018.07.12.23.39.30; Thu, 12 Jul 2018 23:39:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727582AbeGMGv5 (ORCPT + 99 others); Fri, 13 Jul 2018 02:51:57 -0400 Received: from mx01.hxt-semitech.com.96.203.223.in-addr.arpa ([223.203.96.7]:43579 "EHLO barracuda.hxt-semitech.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726655AbeGMGv5 (ORCPT ); Fri, 13 Jul 2018 02:51:57 -0400 X-ASG-Debug-ID: 1531463917-093b7e2c7c7c950001-xx1T2L Received: from HXTBJIDCEMVIW01.hxtcorp.net (localhost [10.128.0.14]) by barracuda.hxt-semitech.com with ESMTP id X76TnoJOl3LFCMXb (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Jul 2018 14:38:37 +0800 (CST) X-Barracuda-Envelope-From: shunyong.yang@hxt-semitech.com Received: from y.localdomain (10.5.21.109) by HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) with Microsoft SMTP Server (TLS) id 15.0.847.32; Fri, 13 Jul 2018 14:38:41 +0800 From: Shunyong Yang To: CC: , , Shunyong Yang , Joey Zheng Subject: [PATCH] PCI: Unify pci and normal dma direction definition Date: Fri, 13 Jul 2018 14:37:20 +0800 X-ASG-Orig-Subj: [PATCH] PCI: Unify pci and normal dma direction definition Message-ID: <1531463840-34651-1-git-send-email-shunyong.yang@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.5.21.109] X-ClientProxiedBy: HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) To HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) X-Barracuda-Connect: localhost[10.128.0.14] X-Barracuda-Start-Time: 1531463917 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.6595 1.0000 1.0827 X-Barracuda-Spam-Score: 1.08 X-Barracuda-Spam-Status: No, SCORE=1.08 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.53547 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current DMA direction definitions in pci-dma-compat.h and dma-direction.h are mirrored in value. Unify them to enhance readability and avoid possible inconsistency. Cc: Joey Zheng Signed-off-by: Shunyong Yang --- include/linux/dma-direction.h | 2 +- include/linux/pci-dma-compat.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/dma-direction.h b/include/linux/dma-direction.h index 3649a031893a..9d52716e9218 100644 --- a/include/linux/dma-direction.h +++ b/include/linux/dma-direction.h @@ -2,7 +2,7 @@ #ifndef _LINUX_DMA_DIRECTION_H #define _LINUX_DMA_DIRECTION_H /* - * These definitions mirror those in pci.h, so they can be used + * These definitions mirror those in pci-dma-compat.h, so they can be used * interchangeably with their PCI_ counterparts. */ enum dma_data_direction { diff --git a/include/linux/pci-dma-compat.h b/include/linux/pci-dma-compat.h index 0dd1a3f7b309..c1c8d49b6072 100644 --- a/include/linux/pci-dma-compat.h +++ b/include/linux/pci-dma-compat.h @@ -8,10 +8,10 @@ #include /* This defines the direction arg to the DMA mapping routines. */ -#define PCI_DMA_BIDIRECTIONAL 0 -#define PCI_DMA_TODEVICE 1 -#define PCI_DMA_FROMDEVICE 2 -#define PCI_DMA_NONE 3 +#define PCI_DMA_BIDIRECTIONAL (DMA_BIDIRECTIONAL) +#define PCI_DMA_TODEVICE (DMA_TO_DEVICE) +#define PCI_DMA_FROMDEVICE (DMA_FROM_DEVICE) +#define PCI_DMA_NONE (DMA_NONE) static inline void * pci_alloc_consistent(struct pci_dev *hwdev, size_t size, -- 1.8.3.1