From patchwork Fri May 19 06:53:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9735943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 57414601C2 for ; Fri, 19 May 2017 06:57:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51BBA288A6 for ; Fri, 19 May 2017 06:57:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46634288A9; Fri, 19 May 2017 06:57:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C9201288A6 for ; Fri, 19 May 2017 06:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6uj5LVjPSvvyV7V6INsGE7Oz2JJp55yU/dbe3s3rIBw=; b=ZcpqdvqmLGgic5NsW2YHvQUgMQ s5hDfWP69cci6m80aGVQV7mQflSdfYMnJdNJhkUAEXXr3GDpuX+Utu0ye2Vg+a/IZ6zNg99mJR6Gx VPqmq94HXT6wYT2JV+/lZI2BAEdUZtezDOHX0edvOS7HH2PG0sHQaMNMnYMyABD16Eyjt4Lz7ZFdu kLEHnAf85rK9YOobn9kMzngdeeP9al9Cyb8ac9801Jtg0j80Wu0UbfK4ehq+NZ7NU1ay29W2+eJO1 fadw2mvNBxg8r+cDLFpT7elx16j1+rGSr42BBY18I+6l17iEdCJEe6St22oUSBbdkblKtHfZwGO7a zpxStIaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dBbrJ-00062E-Nd; Fri, 19 May 2017 06:57:57 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBbpc-0004Qw-4I; Fri, 19 May 2017 06:56:14 +0000 Received: by mail-wr0-x242.google.com with SMTP id g12so1742491wrg.2; Thu, 18 May 2017 23:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X04EXNDg09dtWCiUFxMOtseUrDvRl+oLTv5katDFjl8=; b=BOhacPXdgrBgqbc+TZXS6IhzuXiKCwoIQcJbubfi6uWPNJ2u0QCSXDuuOIJJ4ikZ4S VAaCke1ITAm4TFKqOHNMOIzK84226eu5KolPXBnvVivrXWFNPddqASO8xLqakOKYEr/G YoRhHCyNCnCiynukO47qzsZTQtwM9fp7PIJZIL2ToeDSl+3rb1WtDYMqhA4vBLICYFoW t35h+BPjnd4IjGClsmn/GnUwHdbvd+Q2YlUhSMkoOZRSMePWTppBZKZq4vp4t8E5LwqE 58FpzGkd3kfdHe/P1UauKcjsMKVJIGtiIr1g7M1xx/nECDLmn3aCG9s0ytoQ4YoLmWmu 4rAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X04EXNDg09dtWCiUFxMOtseUrDvRl+oLTv5katDFjl8=; b=CkbQSwXhMqIGivwzue0HAlkIIPYZUqaSCjIC+vApCxhmT7LMy31fNOGYqxJioddhcG L3sVqYboxY2K+EmEETc8h/t/yvq/bKv5Uw3xErFLn6HXTFKSJIHcPb5HbL54yFSUSpr5 DBWBawlCuqKeYFHPEyJOJiJooOEF8Vwqqomv4DWKOsJgpWZWxQlQCIQxkNcujIAUPnRR javYllJHXInj9/QpbnA+WYN559q3Lu8JAIIag4El2nzTHDZnwUID/DJr7LonkA4UCyEj P2txI/G6iMEhJwbU5sDg5k9zeoD2wyPXXHCUy3+apRa1M9ANy1/iBKVnG2x9xQl2381T GZfA== X-Gm-Message-State: AODbwcA4+z8jjDf/c3/CKvRUW1OAo3k22YTZ+wRqRZRF+UUHvwL5UHx9 NJ3/+V+8OgyWDQ== X-Received: by 10.223.170.134 with SMTP id h6mr2147303wrc.36.1495176950487; Thu, 18 May 2017 23:55:50 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id 1sm3256734wrw.32.2017.05.18.23.55.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 May 2017 23:55:50 -0700 (PDT) From: Corentin Labbe To: herbert@gondor.apana.org.au, davem@davemloft.net, thomas.lendacky@amd.com, gary.hook@amd.com, boris.brezillon@free-electrons.com, arno@natisbad.org, matthias.bgg@gmail.com, giovanni.cabiddu@intel.com, salvatore.benedetto@intel.com Subject: [PATCH v2 4/9] crypto: marvell - Use IPAD/OPAD constant Date: Fri, 19 May 2017 08:53:26 +0200 Message-Id: <20170519065331.27670-5-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170519065331.27670-1-clabbe.montjoie@gmail.com> References: <20170519065331.27670-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170518_235612_472931_6764B489 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qat-linux@intel.com, linux-kernel@vger.kernel.org, Corentin Labbe , linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Acked-by: Boris Brezillon --- drivers/crypto/marvell/hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index 77c0fb936f47..e61b08566093 100644 --- a/drivers/crypto/marvell/hash.c +++ b/drivers/crypto/marvell/hash.c @@ -12,6 +12,7 @@ * by the Free Software Foundation. */ +#include #include #include @@ -1164,8 +1165,8 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req, memcpy(opad, ipad, blocksize); for (i = 0; i < blocksize; i++) { - ipad[i] ^= 0x36; - opad[i] ^= 0x5c; + ipad[i] ^= HMAC_IPAD_VALUE; + opad[i] ^= HMAC_OPAD_VALUE; } return 0;