{"id":818196,"url":"http://patchwork.ozlabs.org/api/patches/818196/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20170925110738.68382-2-mika.westerberg@linux.intel.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170925110738.68382-2-mika.westerberg@linux.intel.com>","list_archive_url":null,"date":"2017-09-25T11:07:23","name":"[v2,01/16] byteorder: Move {cpu_to_be32,be32_to_cpu}_array() from Thunderbolt to core","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":true,"hash":"62b0b91ade46e47d8c00324a48a46774501f3e2d","submitter":{"id":14534,"url":"http://patchwork.ozlabs.org/api/people/14534/?format=json","name":"Mika Westerberg","email":"mika.westerberg@linux.intel.com"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20170925110738.68382-2-mika.westerberg@linux.intel.com/mbox/","series":[{"id":4937,"url":"http://patchwork.ozlabs.org/api/series/4937/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=4937","date":"2017-09-25T11:07:27","name":"Thunderbolt networking","version":2,"mbox":"http://patchwork.ozlabs.org/series/4937/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/818196/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/818196/checks/","tags":{},"related":[],"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y11dC6XNrz9sPk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 21:12:15 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934866AbdIYLHo (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 07:07:44 -0400","from mga11.intel.com ([192.55.52.93]:38289 \"EHLO mga11.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S932656AbdIYLHm (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 25 Sep 2017 07:07:42 -0400","from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Sep 2017 04:07:42 -0700","from black.fi.intel.com ([10.237.72.28])\n\tby fmsmga004.fm.intel.com with ESMTP; 25 Sep 2017 04:07:39 -0700","by black.fi.intel.com (Postfix, from userid 1001)\n\tid 5C295120; Mon, 25 Sep 2017 14:07:38 +0300 (EEST)"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,435,1500966000\"; d=\"scan'208\";a=\"315842236\"","From":"Mika Westerberg <mika.westerberg@linux.intel.com>","To":"Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"David S . Miller\" <davem@davemloft.net>","Cc":"Andreas Noever <andreas.noever@gmail.com>,\n\tMichael Jamet <michael.jamet@intel.com>,\n\tYehezkel Bernat <yehezkel.bernat@intel.com>,\n\tAmir Levy <amir.jer.levy@intel.com>,\n\tMario.Limonciello@dell.com, Lukas Wunner <lukas@wunner.de>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tAndrew Lunn <andrew@lunn.ch>,\n\tMika Westerberg <mika.westerberg@linux.intel.com>,\n\tlinux-kernel@vger.kernel.org, netdev@vger.kernel.org","Subject":"[PATCH v2 01/16] byteorder: Move {cpu_to_be32,\n\tbe32_to_cpu}_array() from Thunderbolt to core","Date":"Mon, 25 Sep 2017 14:07:23 +0300","Message-Id":"<20170925110738.68382-2-mika.westerberg@linux.intel.com>","X-Mailer":"git-send-email 2.14.1","In-Reply-To":"<20170925110738.68382-1-mika.westerberg@linux.intel.com>","References":"<20170925110738.68382-1-mika.westerberg@linux.intel.com>","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"We will be using these when communicating XDomain discovery protocol\nover Thunderbolt link but they might be useful for other drivers as\nwell.\n\nMake them available through byteorder/generic.h.\n\nSuggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>\nSigned-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>\nReviewed-by: Michael Jamet <michael.jamet@intel.com>\nReviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>\n---\n drivers/thunderbolt/ctl.c         | 14 --------------\n include/linux/byteorder/generic.h | 16 ++++++++++++++++\n 2 files changed, 16 insertions(+), 14 deletions(-)","diff":"diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c\nindex fb40dd0588b9..e6a4c9458c76 100644\n--- a/drivers/thunderbolt/ctl.c\n+++ b/drivers/thunderbolt/ctl.c\n@@ -289,20 +289,6 @@ static void tb_cfg_print_error(struct tb_ctl *ctl,\n \t}\n }\n \n-static void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)\n-{\n-\tint i;\n-\tfor (i = 0; i < len; i++)\n-\t\tdst[i] = cpu_to_be32(src[i]);\n-}\n-\n-static void be32_to_cpu_array(u32 *dst, __be32 *src, size_t len)\n-{\n-\tint i;\n-\tfor (i = 0; i < len; i++)\n-\t\tdst[i] = be32_to_cpu(src[i]);\n-}\n-\n static __be32 tb_crc(const void *data, size_t len)\n {\n \treturn cpu_to_be32(~__crc32c_le(~0, data, len));\ndiff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h\nindex 89f67c1c3160..805d16654459 100644\n--- a/include/linux/byteorder/generic.h\n+++ b/include/linux/byteorder/generic.h\n@@ -170,4 +170,20 @@ static inline void be64_add_cpu(__be64 *var, u64 val)\n \t*var = cpu_to_be64(be64_to_cpu(*var) + val);\n }\n \n+static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < len; i++)\n+\t\tdst[i] = cpu_to_be32(src[i]);\n+}\n+\n+static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < len; i++)\n+\t\tdst[i] = be32_to_cpu(src[i]);\n+}\n+\n #endif /* _LINUX_BYTEORDER_GENERIC_H */\n","prefixes":["v2","01/16"]}