diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-03-21 13:01:40 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-03-30 13:33:09 -0400 |
commit | 9def051018c08e65c532822749e857eb4b2e12e7 (patch) | |
tree | 3a8c6d7fd82e4828669b561c84255e4c0d35a5bd /crypto/md4.c | |
parent | 0550f5a5f0c5bac10e982c1e968db9f3f297dda3 (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/md4.c')
-rw-r--r-- | crypto/md4.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/crypto/md4.c b/crypto/md4.c index 3515af425cc9..810fefb0a007 100644 --- a/crypto/md4.c +++ b/crypto/md4.c | |||
@@ -64,23 +64,6 @@ static inline u32 H(u32 x, u32 y, u32 z) | |||
64 | #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (u32)0x5A827999,s)) | 64 | #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (u32)0x5A827999,s)) |
65 | #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (u32)0x6ED9EBA1,s)) | 65 | #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (u32)0x6ED9EBA1,s)) |
66 | 66 | ||
67 | /* XXX: this stuff can be optimized */ | ||
68 | static inline void le32_to_cpu_array(u32 *buf, unsigned int words) | ||
69 | { | ||
70 | while (words--) { | ||
71 | __le32_to_cpus(buf); | ||
72 | buf++; | ||
73 | } | ||
74 | } | ||
75 | |||
76 | static inline void cpu_to_le32_array(u32 *buf, unsigned int words) | ||
77 | { | ||
78 | while (words--) { | ||
79 | __cpu_to_le32s(buf); | ||
80 | buf++; | ||
81 | } | ||
82 | } | ||
83 | |||
84 | static void md4_transform(u32 *hash, u32 const *in) | 67 | static void md4_transform(u32 *hash, u32 const *in) |
85 | { | 68 | { |
86 | u32 a, b, c, d; | 69 | u32 a, b, c, d; |