From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755201AbbIMTBe (ORCPT ); Sun, 13 Sep 2015 15:01:34 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:34821 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753550AbbIMTBd (ORCPT ); Sun, 13 Sep 2015 15:01:33 -0400 From: Alexander Kuleshov To: Andrew Morton Cc: Rasmus Villemoes , linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [PATCH] lib/halfmd4: Use rol32 inline function in the ROUND macro Date: Mon, 14 Sep 2015 01:00:32 +0600 Message-Id: <1442170832-9316-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The provides rol32() inline function, let's use already predefined function instead of direct expression. Signed-off-by: Alexander Kuleshov --- lib/halfmd4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/halfmd4.c b/lib/halfmd4.c index a8fe627..137e861 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 -- 2.5.0