From: Alexander Kuleshov Date: Sat, 7 Nov 2015 00:31:11 +0000 (-0800) Subject: lib/halfmd4.c: use rol32 inline function in the ROUND macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c78bc170f393317dfa9d57baa599a51061ea86a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git lib/halfmd4.c: use rol32 inline function in the ROUND macro provides rol32() inline function, let's use already predefined function instead of direct expression. Signed-off-by: Alexander Kuleshov Cc: Herbert Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/halfmd4.c b/lib/halfmd4.c index a8fe6274a13c..137e861d9690 100644 --- a/lib/halfmd4.c +++ b/lib/halfmd4.c @@ -1,6 +1,7 @@ #include #include #include +#include /* F, G and H are basic MD4 functions: selection, majority, parity */ #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) @@ -14,7 +15,7 @@ * Rotation is separate from addition to prevent recomputation */ #define ROUND(f, a, b, c, d, x, s) \ - (a += f(b, c, d) + x, a = (a << s) | (a >> (32 - s))) + (a += f(b, c, d) + x, a = rol32(a, s)) #define K1 0 #define K2 013240474631UL #define K3 015666365641UL