From patchwork Fri May 19 06:53:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9735975 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 45E5B6034C for ; Fri, 19 May 2017 07:02:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 361E7288A9 for ; Fri, 19 May 2017 07:02:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AB35288AE; Fri, 19 May 2017 07:02:07 +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 AEA69288A9 for ; Fri, 19 May 2017 07:02:06 +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=JmMZL6qYoqyI4XHc8KlB0AT+vCLzFgjaJdjfeWhlmJc=; b=FwMCYoImxqXkF1Davbt9WsdC1u 4UNg1z+zmVONuDhNISuVZfrpSeZSbUXK9hL+M8+DGfFPuJM5FYuNz8YxhsINkMMx2p+x3gj52cBO1 rXltqXnUfKq1IFQRNZ8heSeRMYQR2XDAMbeRh6mMndCbcDOCMZqPXxzeO1rpxtWQUe3tSpzn4eK/7 11vNg0ZmxYtMNjoP+64g/zd0ghd/YP1NT42Tyd1+rRX95NTvjFj2gXlsxKq4cklLUmX/F9hEaiL/j na8nmF6tenlcr9+LKL+I3O+umjO+pzCSA4mLE87sgxnQfDlrRtTdOe+77XOBpeWp+JApCIsxZ/uc+ iXXCfnuQ==; 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 1dBbvJ-0001q0-OW; Fri, 19 May 2017 07:02:05 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBbpa-0004Qu-5F; Fri, 19 May 2017 06:56:11 +0000 Received: by mail-wm0-x244.google.com with SMTP id d127so16122074wmf.1; Thu, 18 May 2017 23:55: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=T9FR8GC4c8ynb0akePyCRKVjbSAcOylo+8iyx/idBfg=; b=vPnbqoDfsscXdIq0ajdLz+y2LoS+mLuCN08HEP+SHDRqxaW2QRrTfFAcl+tnmxccja RpJkeFCMfn+2C2JlBYW3DklRdDopk7aHTAaSsC3EDve8Tl+OmR3XbSQ/7JEzdvgTiyjT CX9Rtjv9s2AdEMNAS/biR128EOMSLo/ndpufWpn/adXeeJGipFwc5RQo+lEhonhs/UAS VLEqWekZzLSWr3CVKKB7NpYZtJ/t80XKDzg+g9WGuVTmJUBUkCeEs/QZVMn6fsXS0RVj Pr0/PWZrz15UJfTlvD2+Jee4LSR5rWgFGNAHtr7I8Tk8q9nQ2q2tF5ZGKpRPQP0b35yp jT8g== 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=T9FR8GC4c8ynb0akePyCRKVjbSAcOylo+8iyx/idBfg=; b=f5w2VKhhKba/yqIQLCsQDC696Z0VtO47jVl+eU+knWv05U8h9t7RlJDRcV6+zfPu4y kYvYnhZMw4Pqzca+PawygrYhYTqgxAOvokOyS5WedHiXO3zsUCk5jVGtaYx1bst/iDao 1WPGAZ1yjYgJ9V41eOITq+/p2vM/viF3mXD0ZurV25/X5KfwWdDOh7OIOPtyNb6oL1dh r7pPRVuPT/g0VFjlFgJde5mJbshmyolkJPOoXi0jAzOflRrYY4W0dbVpsl83q+Jx0Dak WbMfvl/b1S7ZXEmmJ9JQucY9aEjLiXIlyArlkvA2AVgfpJibCQ/wXPhpn2phMDcXGoJ2 wXTA== X-Gm-Message-State: AODbwcAUfQOgUQOshoFrrKCC1CIurYopj6rjh6FOoHdYt699rik0S0kq h4CfPpak4eUexQ== X-Received: by 10.28.62.81 with SMTP id l78mr16409334wma.105.1495176948420; Thu, 18 May 2017 23:55: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 1sm3256734wrw.32.2017.05.18.23.55.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 May 2017 23:55: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 Subject: [PATCH v2 2/9] crypto: brcm - Use IPAD/OPAD constant Date: Fri, 19 May 2017 08:53:24 +0200 Message-Id: <20170519065331.27670-3-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_235610_358279_5FB4CE1E X-CRM114-Status: UNSURE ( 9.75 ) 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/bcm/cipher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c index cc0d5b98006e..61393dc70b0b 100644 --- a/drivers/crypto/bcm/cipher.c +++ b/drivers/crypto/bcm/cipher.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -2510,8 +2511,8 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key, memcpy(ctx->opad, ctx->ipad, blocksize); for (index = 0; index < blocksize; index++) { - ctx->ipad[index] ^= 0x36; - ctx->opad[index] ^= 0x5c; + ctx->ipad[index] ^= HMAC_IPAD_VALUE; + ctx->opad[index] ^= HMAC_OPAD_VALUE; } flow_dump(" ipad: ", ctx->ipad, blocksize);