diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2017-10-02 12:38:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-02 20:24:40 +0200 |
commit | f2f2efb807d339513199b1bb771806c90cce83ae (patch) | |
tree | 58d333fd0e30d825c72f6197900ebfd32113a7cb /drivers/thunderbolt/ctl.c | |
parent | Merge branch 'mlxsw-Fixlets' (diff) | |
download | linux-f2f2efb807d339513199b1bb771806c90cce83ae.tar.xz linux-f2f2efb807d339513199b1bb771806c90cce83ae.zip |
byteorder: Move {cpu_to_be32, be32_to_cpu}_array() from Thunderbolt to core
We will be using these when communicating XDomain discovery protocol
over Thunderbolt link but they might be useful for other drivers as
well.
Make them available through byteorder/generic.h.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Michael Jamet <michael.jamet@intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/thunderbolt/ctl.c')
-rw-r--r-- | drivers/thunderbolt/ctl.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index fb40dd0588b9..e6a4c9458c76 100644 --- a/drivers/thunderbolt/ctl.c +++ b/drivers/thunderbolt/ctl.c @@ -289,20 +289,6 @@ static void tb_cfg_print_error(struct tb_ctl *ctl, } } -static void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) -{ - int i; - for (i = 0; i < len; i++) - dst[i] = cpu_to_be32(src[i]); -} - -static void be32_to_cpu_array(u32 *dst, __be32 *src, size_t len) -{ - int i; - for (i = 0; i < len; i++) - dst[i] = be32_to_cpu(src[i]); -} - static __be32 tb_crc(const void *data, size_t len) { return cpu_to_be32(~__crc32c_le(~0, data, len)); |