From patchwork Mon Apr 24 14:16:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9696499 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 495D5601AE for ; Mon, 24 Apr 2017 14:19:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A0A027813 for ; Mon, 24 Apr 2017 14:19:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EEDC28329; Mon, 24 Apr 2017 14:19:31 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5FC128342 for ; Mon, 24 Apr 2017 14:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1169907AbdDXOTW (ORCPT ); Mon, 24 Apr 2017 10:19:22 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35287 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1172409AbdDXOSt (ORCPT ); Mon, 24 Apr 2017 10:18:49 -0400 Received: by mail-wm0-f68.google.com with SMTP id d79so17664220wmi.2; Mon, 24 Apr 2017 07:18:49 -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=uY+bhW2soLjCP0WEBiglRprUR3+wy/P6g4AtKWFwUXQ=; b=Qzn4ZbFBR+u1dB+/QBeWTv8JmtncjvMa2EXKl7tDUIgUdhTDgRMmmODZ6EFF/jmt2q k9IoEOqzBrsKR0007zH3gQepVfi4yvrI/3w2O2rTQmuLtgQ+2ycPn0N0WtPbS10+XjH+ Wx6YYTyXrDs3F2u+JAusluqBcOBDCl5UmNSmLh27jZJpPxKedoSm7VMS9OBKmnqxyhZD gbZU4q+oPhFWA1TE3etYuj+FBLPTF6mAP/cf33EbP5qAbqf+/YZhMVCxusVAfLconO8J kGZhYmzDwMIoVrjGIwOZYbYaaq5xKPwd8mAUG8T7zjq8YFideJJT+NnzS6rX0s7T8brV vvsw== 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=uY+bhW2soLjCP0WEBiglRprUR3+wy/P6g4AtKWFwUXQ=; b=E6Lt2BLSWm1hTP0G9qHxPSi6HOHvhoedqpR4cGY4PewDzRquoyRNvDRhE9AX1BDh6z Hq0wsRUXJJkkMZ+SykCHPCk1dYssGStEStdgJt8lt3G301A9hMYeRpvmK9poWo8bSCzI 3Wzv10zU20Wzm++C8TFQhexxVjTDjXvVoTKjeI7JxoGbQ/QSS0bJNVlNmypl7ZuImSSI ncPkh2Xoqo/cm6u4K0nwz/9S7Glu0mWnImNEE7IELE+utXeIMTE8PZj3jUVJxVU7CKum HlpJlM4EI824CHhExXZiAUKCdL4W20CN5Oy6G15zhFHRMY5P04rS+gHJ0zCZC0jt8CDb dp4Q== X-Gm-Message-State: AN3rC/7WwbXPiuiR9lieWnsaxmWLPMMEQpFCm4jF2mHCxC2UAvTekDkR IKOnYIKqP80nfw== X-Received: by 10.28.199.2 with SMTP id x2mr10067499wmf.94.1493043528217; Mon, 24 Apr 2017 07:18:48 -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 q140sm548033wmb.14.2017.04.24.07.18.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Apr 2017 07:18:47 -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 Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, Corentin Labbe Subject: [PATCH 7/9] crypto: qat - Use IPAD/OPAD constant Date: Mon, 24 Apr 2017 16:16:27 +0200 Message-Id: <20170424141629.27155-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170424141629.27155-1-clabbe.montjoie@gmail.com> References: <20170424141629.27155-1-clabbe.montjoie@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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 --- drivers/crypto/qat/qat_common/qat_algs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 20f35df..6843fe2 100644 --- a/drivers/crypto/qat/qat_common/qat_algs.c +++ b/drivers/crypto/qat/qat_common/qat_algs.c @@ -178,8 +178,8 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash, for (i = 0; i < block_size; i++) { char *ipad_ptr = ipad + i; char *opad_ptr = opad + i; - *ipad_ptr ^= 0x36; - *opad_ptr ^= 0x5C; + *ipad_ptr ^= HMAC_IPAD_VALUE; + *opad_ptr ^= HMAC_OPAD_VALUE; } if (crypto_shash_init(shash))