[{"id":1757600,"web_url":"http://patchwork.ozlabs.org/comment/1757600/","msgid":"<1503678883.25945.107.camel@linux.intel.com>","list_archive_url":null,"date":"2017-08-25T16:34:43","subject":"Re: [U-Boot] [PATCH] dma: import linux/dma-direction.h to\n\tconsolidate enum dma_data_direction","submitter":{"id":8583,"url":"http://patchwork.ozlabs.org/api/people/8583/","name":"Andy Shevchenko","email":"andriy.shevchenko@linux.intel.com"},"content":"On Sat, 2017-08-26 at 00:50 +0900, Masahiro Yamada wrote:\n> Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete\n> duplicated definitions of enum dma_data_direction.\n> \n\nMakes sense.\n\nReviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>\n\n> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n> ---\n> \n>  arch/arm/include/asm/dma-mapping.h   |  8 ++------\n>  arch/nds32/include/asm/dma-mapping.h |  6 +-----\n>  arch/x86/include/asm/dma-mapping.h   |  8 ++------\n>  drivers/ata/sata_dwc.c               |  1 +\n>  drivers/ata/sata_dwc.h               |  7 -------\n>  drivers/mmc/uniphier-sd.c            |  2 +-\n>  include/linux/dma-direction.h        | 13 +++++++++++++\n>  7 files changed, 20 insertions(+), 25 deletions(-)\n>  create mode 100644 include/linux/dma-direction.h\n> \n> diff --git a/arch/arm/include/asm/dma-mapping.h\n> b/arch/arm/include/asm/dma-mapping.h\n> index a5821f54e567..287466800e4b 100644\n> --- a/arch/arm/include/asm/dma-mapping.h\n> +++ b/arch/arm/include/asm/dma-mapping.h\n> @@ -8,13 +8,9 @@\n>  #ifndef __ASM_ARM_DMA_MAPPING_H\n>  #define __ASM_ARM_DMA_MAPPING_H\n>  \n> -#define\tdma_mapping_error(x, y)\t0\n> +#include <linux/dma-direction.h>\n>  \n> -enum dma_data_direction {\n> -\tDMA_BIDIRECTIONAL\t= 0,\n> -\tDMA_TO_DEVICE\t\t= 1,\n> -\tDMA_FROM_DEVICE\t\t= 2,\n> -};\n> +#define\tdma_mapping_error(x, y)\t0\n>  \n>  static inline void *dma_alloc_coherent(size_t len, unsigned long\n> *handle)\n>  {\n> diff --git a/arch/nds32/include/asm/dma-mapping.h\n> b/arch/nds32/include/asm/dma-mapping.h\n> index 25e5a1b6ec8a..a627306ed852 100644\n> --- a/arch/nds32/include/asm/dma-mapping.h\n> +++ b/arch/nds32/include/asm/dma-mapping.h\n> @@ -7,11 +7,7 @@\n>  #ifndef __ASM_NDS_DMA_MAPPING_H\n>  #define __ASM_NDS_DMA_MAPPING_H\n>  \n> -enum dma_data_direction {\n> -\tDMA_BIDIRECTIONAL\t= 0,\n> -\tDMA_TO_DEVICE\t\t= 1,\n> -\tDMA_FROM_DEVICE\t\t= 2,\n> -};\n> +#include <linux/dma-direction.h>\n>  \n>  static void *dma_alloc_coherent(size_t len, unsigned long *handle)\n>  {\n> diff --git a/arch/x86/include/asm/dma-mapping.h\n> b/arch/x86/include/asm/dma-mapping.h\n> index 7de4c08e36ea..43073ad2524f 100644\n> --- a/arch/x86/include/asm/dma-mapping.h\n> +++ b/arch/x86/include/asm/dma-mapping.h\n> @@ -8,13 +8,9 @@\n>  #ifndef __ASM_X86_DMA_MAPPING_H\n>  #define __ASM_X86_DMA_MAPPING_H\n>  \n> -#define\tdma_mapping_error(x, y)\t0\n> +#include <linux/dma-direction.h>\n>  \n> -enum dma_data_direction {\n> -\tDMA_BIDIRECTIONAL\t= 0,\n> -\tDMA_TO_DEVICE\t\t= 1,\n> -\tDMA_FROM_DEVICE\t\t= 2,\n> -};\n> +#define\tdma_mapping_error(x, y)\t0\n>  \n>  static inline void *dma_alloc_coherent(size_t len, unsigned long\n> *handle)\n>  {\n> diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c\n> index a226ca2decb5..2f3b2ddb411f 100644\n> --- a/drivers/ata/sata_dwc.c\n> +++ b/drivers/ata/sata_dwc.c\n> @@ -26,6 +26,7 @@\n>  #include <command.h>\n>  #include <pci.h>\n>  #include <asm/processor.h>\n> +#include <linux/dma-direction.h>\n>  #include <linux/errno.h>\n>  #include <asm/io.h>\n>  #include <malloc.h>\n> diff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h\n> index e2d9e0c1fce8..17fb20cf437b 100644\n> --- a/drivers/ata/sata_dwc.h\n> +++ b/drivers/ata/sata_dwc.h\n> @@ -401,13 +401,6 @@ struct ata_device {\n>  #endif\n>  };\n>  \n> -enum dma_data_direction {\n> -\tDMA_BIDIRECTIONAL = 0,\n> -\tDMA_TO_DEVICE = 1,\n> -\tDMA_FROM_DEVICE = 2,\n> -\tDMA_NONE = 3,\n> -};\n> -\n>  struct ata_link {\n>  \tstruct ata_port\t\t*ap;\n>  \tint\t\t\tpmp;\n> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c\n> index e272b1415324..721b75fddace 100644\n> --- a/drivers/mmc/uniphier-sd.c\n> +++ b/drivers/mmc/uniphier-sd.c\n> @@ -11,10 +11,10 @@\n>  #include <mmc.h>\n>  #include <dm.h>\n>  #include <linux/compat.h>\n> +#include <linux/dma-direction.h>\n>  #include <linux/io.h>\n>  #include <linux/sizes.h>\n>  #include <asm/unaligned.h>\n> -#include <asm/dma-mapping.h>\n>  \n>  DECLARE_GLOBAL_DATA_PTR;\n>  \n> diff --git a/include/linux/dma-direction.h b/include/linux/dma-\n> direction.h\n> new file mode 100644\n> index 000000000000..95b6a82f5951\n> --- /dev/null\n> +++ b/include/linux/dma-direction.h\n> @@ -0,0 +1,13 @@\n> +#ifndef _LINUX_DMA_DIRECTION_H\n> +#define _LINUX_DMA_DIRECTION_H\n> +/*\n> + * These definitions mirror those in pci.h, so they can be used\n> + * interchangeably with their PCI_ counterparts.\n> + */\n> +enum dma_data_direction {\n> +\tDMA_BIDIRECTIONAL = 0,\n> +\tDMA_TO_DEVICE = 1,\n> +\tDMA_FROM_DEVICE = 2,\n> +\tDMA_NONE = 3,\n> +};\n> +#endif","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xf6GV35tKz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 26 Aug 2017 02:35:30 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid F2CDEC21F87; Fri, 25 Aug 2017 16:35:23 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 8C1E8C21F3D;\n\tFri, 25 Aug 2017 16:35:21 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid F360AC21C3F; Fri, 25 Aug 2017 16:35:19 +0000 (UTC)","from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby lists.denx.de (Postfix) with ESMTPS id DF6F8C21C3F\n\tfor <u-boot@lists.denx.de>; Fri, 25 Aug 2017 16:35:18 +0000 (UTC)","from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga104.jf.intel.com with ESMTP; 25 Aug 2017 09:35:17 -0700","from smile.fi.intel.com (HELO smile) ([10.237.72.86])\n\tby orsmga001.jf.intel.com with ESMTP; 25 Aug 2017 09:34:44 -0700"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED\n\tautolearn=unavailable autolearn_force=no version=3.4.0","X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos; i=\"5.41,426,1498546800\"; d=\"scan'208\";\n\ta=\"1166137042\"","Message-ID":"<1503678883.25945.107.camel@linux.intel.com>","From":"Andy Shevchenko <andriy.shevchenko@linux.intel.com>","To":"Masahiro Yamada <yamada.masahiro@socionext.com>, u-boot@lists.denx.de","Date":"Fri, 25 Aug 2017 19:34:43 +0300","In-Reply-To":"<1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com>","References":"<1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com>","Organization":"Intel Finland Oy","X-Mailer":"Evolution 3.22.6-1 ","Mime-Version":"1.0","Cc":"Albert Aribaud <albert.u.boot@aribaud.net>,\n\tMacpaul Lin <macpaul@andestech.com>","Subject":"Re: [U-Boot] [PATCH] dma: import linux/dma-direction.h to\n\tconsolidate enum dma_data_direction","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1767494,"web_url":"http://patchwork.ozlabs.org/comment/1767494/","msgid":"<20170913022944.GT4474@bill-the-cat>","list_archive_url":null,"date":"2017-09-13T02:29:44","subject":"Re: [U-Boot] dma: import linux/dma-direction.h to consolidate enum\n\tdma_data_direction","submitter":{"id":65875,"url":"http://patchwork.ozlabs.org/api/people/65875/","name":"Tom Rini","email":"trini@konsulko.com"},"content":"On Sat, Aug 26, 2017 at 12:50:17AM +0900, Masahiro Yamada wrote:\n\n> Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete\n> duplicated definitions of enum dma_data_direction.\n> \n> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>\n\nApplied to u-boot/master, thanks!","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=konsulko.com header.i=@konsulko.com\n\theader.b=\"EDzHtmnl\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsQzs1vWqz9t30\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 12:47:05 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid EEFB9C2240F; Wed, 13 Sep 2017 02:38:14 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 33C56C223A9;\n\tWed, 13 Sep 2017 02:38:11 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid C71B1C223B4; Wed, 13 Sep 2017 02:29:52 +0000 (UTC)","from mail-yw0-f175.google.com (mail-yw0-f175.google.com\n\t[209.85.161.175])\n\tby lists.denx.de (Postfix) with ESMTPS id 1364BC2237F\n\tfor <u-boot@lists.denx.de>; Wed, 13 Sep 2017 02:29:49 +0000 (UTC)","by mail-yw0-f175.google.com with SMTP id s62so32132509ywg.0\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 19:29:48 -0700 (PDT)","from bill-the-cat ([2606:a000:140b:dc:202f:e2cf:a300:56c])\n\tby smtp.gmail.com with ESMTPSA id\n\tw199sm4567445yww.39.2017.09.12.19.29.46\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tTue, 12 Sep 2017 19:29:47 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=FZe/8tUdXKiWY0HooEZIdcObUEiWYW+yBvl9J67mhE0=;\n\tb=EDzHtmnlyPH2KXZh0gw2k7YvG1NXubp8yoA4iSXLIRt/1FxdqmE2TJH94+3sVdqhpc\n\tnIC/fj4iDsuvbHZ3t5CkLDqsoMjpwWH38iiUu+wL8FvpuInZOSBjpTY9zHbLHGQgSTHn\n\tMUJnVtQqnG/xpRowdZU4bLyBH0jz5k4UycfJw=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=FZe/8tUdXKiWY0HooEZIdcObUEiWYW+yBvl9J67mhE0=;\n\tb=JiwTI4HLTtj59JQ6miNjg6wiYCRQ++GZ4GIxUaNgaKRODKTGi1GEHBi/bp3/bf8qio\n\tX+Vzz9JBOAg3Kia16U2hG/4XG6dtUx+4r5Mwx6KN9V4dq3Zw8ToKaVtn9p/zGSuOw2CT\n\t1pEa0RXNFstfP3gQSuHm5975evCuyHLHhRpyT7go08qzTnWEjCaGLb7994OTm2XQdTnr\n\t4iR8a2FfiXQ94PBeKQwdsLQo4WFSQrVWgTX0RRb5sPw2pTR/V3nRc71ddW7ShTAaa2sB\n\tC5gUqtIQfrjGnKz4ef6YEQwDxAUev41lAzpJ4rBb41ERKQ/XEJikebGHKmNFYYQ5lV84\n\tFGvQ==","X-Gm-Message-State":"AHPjjUh4ZMCYcfB/F4gRrozP7xbyStcRDKV4COlO0MziXQd/T7PXeiBg\n\tYinfuD9W1n5oNaWo","X-Google-Smtp-Source":"ADKCNb4KTdwxT0FEKynZYaEyHfVsWVHfLwqOmZKi57Stf87rK8Cza2s572qyW4aHvEtw3GJXKncZRg==","X-Received":"by 10.13.241.134 with SMTP id\n\ta128mr14485512ywf.180.1505269787930; \n\tTue, 12 Sep 2017 19:29:47 -0700 (PDT)","Date":"Tue, 12 Sep 2017 22:29:44 -0400","From":"Tom Rini <trini@konsulko.com>","To":"Masahiro Yamada <yamada.masahiro@socionext.com>","Message-ID":"<20170913022944.GT4474@bill-the-cat>","References":"<1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com>","MIME-Version":"1.0","In-Reply-To":"<1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","Cc":"u-boot@lists.denx.de, Andy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tMacpaul Lin <macpaul@andestech.com>,\n\tAlbert Aribaud <albert.u.boot@aribaud.net>","Subject":"Re: [U-Boot] dma: import linux/dma-direction.h to consolidate enum\n\tdma_data_direction","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============8248733973253763888==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]