summaryrefslogtreecommitdiffstats
path: root/crypto/md5.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-03-21 13:01:40 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-30 13:33:09 -0400
commit9def051018c08e65c532822749e857eb4b2e12e7 (patch)
tree3a8c6d7fd82e4828669b561c84255e4c0d35a5bd /crypto/md5.c
parent0550f5a5f0c5bac10e982c1e968db9f3f297dda3 (diff)
crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array()
Deduplicate le32_to_cpu_array() and cpu_to_le32_array() by moving them to the generic header. No functional change implied. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/md5.c')
-rw-r--r--crypto/md5.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/crypto/md5.c b/crypto/md5.c
index f7ae1a48225b..f776ef43d621 100644
--- a/crypto/md5.c
+++ b/crypto/md5.c
@@ -32,23 +32,6 @@ const u8 md5_zero_message_hash[MD5_DIGEST_SIZE] = {
32}; 32};
33EXPORT_SYMBOL_GPL(md5_zero_message_hash); 33EXPORT_SYMBOL_GPL(md5_zero_message_hash);
34 34
35/* XXX: this stuff can be optimized */
36static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
37{
38 while (words--) {
39 __le32_to_cpus(buf);
40 buf++;
41 }
42}
43
44static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
45{
46 while (words--) {
47 __cpu_to_le32s(buf);
48 buf++;
49 }
50}
51
52#define F1(x, y, z) (z ^ (x & (y ^ z))) 35#define F1(x, y, z) (z ^ (x & (y ^ z)))
53#define F2(x, y, z) F1(z, x, y) 36#define F2(x, y, z) F1(z, x, y)
54#define F3(x, y, z) (x ^ y ^ z) 37#define F3(x, y, z) (x ^ y ^ z)