From patchwork Mon Apr 24 14:16:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9696543 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 0EE39601AE for ; Mon, 24 Apr 2017 14:21:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 002F827813 for ; Mon, 24 Apr 2017 14:21:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E933928342; Mon, 24 Apr 2017 14:21:09 +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 8475727813 for ; Mon, 24 Apr 2017 14:21:09 +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=Yywmo9OYSp2jlkQu7o6fzUR/c/lxlPyaSb2eDA0L8mo=; b=uiP8mw+RxcCyVDCeVGBLmVYKpz lz8lH8PBjbPfBWx68JSVlz2gkCl+Ju122atkRuGjdT8e+vTp++Gs3tq+5ADzZ1Tp96ecHiknrNQ4Q dpgM7h1ifRInDFLSAua2HHDq7CzUp5VpyauIelVHsaOAeOuUl6xpR51+tiOQs03d/g2WQLxUJuJb6 RYl2LH4SQd3K5Gwl+Vz/2foo+4GDzYLg5HkJz0OaNXvAL9nRVUuo7gZ7zfFmNgH7okDy5yuVZKAXj kLCgYcc9K47Dqc3qDhpfEBTWd92zOdq0yMVYwXzCA/MutnsEqXnK3FbU79xYnkUdN8Ga5M70OZBYW wugEY7uw==; 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 1d2erT-0001uj-RD; Mon, 24 Apr 2017 14:21:07 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2epb-0006Wz-2f; Mon, 24 Apr 2017 14:19:15 +0000 Received: by mail-wm0-x241.google.com with SMTP id u65so17617769wmu.3; Mon, 24 Apr 2017 07:18:50 -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=hXSojt7wtFFkTpgEsp3LUswGV7i3VdTznFIp5UKnVb8=; b=RceqBrne+pMLUNWNeWuw2XT8h+KcuK+G8vqL28bFnbnEuE2lZrvg8JrzIKGzkwtnKJ 8P+tasyXrA9+Asr9WgZn6IpPrS7wg8ei2mPJIJD/9Bb6soG7TkQhaz8lflNG83YOChtU kQ+jEWbyYUMnMICVBCAKMPRF7mbfSloqX2wGKv8v//icjRGoj8HEoTZWD2Sf4lxXfdat wnn81HDCNvsotrnY29zZH3V17tZnuhWIsO3/LlL07RwJsX4XyociRsdEgAuNyYFtjROK 8N2i/BWnJDzNdxNJjrrNSPWnt4nXV/55+n5pfGFysRutK42gm/wEAbVLY6lyRLUtTL14 x+Vg== 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=hXSojt7wtFFkTpgEsp3LUswGV7i3VdTznFIp5UKnVb8=; b=Bdr/l0y0eKTnF1WrWFHU3JhF7julVYeBJt6QYK/FffLnVQ+Iuho7k8q6i97eOI+Xbi 0O5BgK60Ncg/iZm55qPjX1qZUPrn1zF1ZjRq6yMCRX9taYs3bn64a4uTyVo5Ks+IkFMT nT/rhmDtE2YBk9cJ6Qg6QAIHjugKvyWJ5ykoWhY+dY2A6uGzNS2O6US0EwsERkYPSh08 Ayh9pWe7kqxzJus8nwq2xifXYrhtQB3klzI0hdJEYe1VBsEkMSVqUq9UTVgIi9urZ1e6 b26jhNEvlYulQwzAGIz3B8I4Qzq6BL7lmkQUyOzoqK5QIxWuvUfqBBMn8/JmlWfgmqhv upzw== X-Gm-Message-State: AN3rC/5tNC0yxQQBm2NSOjpgK2/Kjp08hUOUswQqOnmuTnouClIYNAIw 7tbKXXVdWKULJQ== X-Received: by 10.28.9.20 with SMTP id 20mr9707553wmj.117.1493043529251; Mon, 24 Apr 2017 07:18:49 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Apr 2017 07:18:48 -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 8/9] crypto: mediatek - Use IPAD/OPAD constant Date: Mon, 24 Apr 2017 16:16:28 +0200 Message-Id: <20170424141629.27155-8-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170424_071911_758687_E585501E X-CRM114-Status: UNSURE ( 9.00 ) 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 --- drivers/crypto/mediatek/mtk-sha.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-sha.c b/drivers/crypto/mediatek/mtk-sha.c index 2226f12..cbcb522 100644 --- a/drivers/crypto/mediatek/mtk-sha.c +++ b/drivers/crypto/mediatek/mtk-sha.c @@ -825,8 +825,8 @@ static int mtk_sha_setkey(struct crypto_ahash *tfm, const u8 *key, memcpy(bctx->opad, bctx->ipad, bs); for (i = 0; i < bs; i++) { - bctx->ipad[i] ^= 0x36; - bctx->opad[i] ^= 0x5c; + bctx->ipad[i] ^= HMAC_IPAD_VALUE; + bctx->opad[i] ^= HMAC_OPAD_VALUE; } return 0;