From patchwork Fri May 19 06:53:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9735955 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 216B5601C2 for ; Fri, 19 May 2017 06:58:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B4DA288A6 for ; Fri, 19 May 2017 06:58:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 102D4288A9; Fri, 19 May 2017 06:58:15 +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 8B705288A6 for ; Fri, 19 May 2017 06:58:14 +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=LyGeoERTSf/4UpSPOJuobzMQgHLhNpLLEXm6A90kRTs=; b=m9JIzm/5xswja+vB019bv0Nghr nfNggleY0VKdjluV972HOQYFKm3Pt1CDndd6a0VNFnHbiQBq1F7KonXvnQsj2DJ2YKsn0McRjPt+R 6k/PloUBDsUN5TS5iO98sN4iJp2rFVJHNP9uFLBUji7G1ZnZqZGBQWCAiPpcBLoHk0qyj2mjaUdvY oE5jGOcPNe/fxLGMWmNUdpsR5dQdyD7KtYNW++u0si2QTFK+xrVB/oH/jz3oURUu+Nfr4np3/wuIl /bIn+ltD2C3RXvRsGDq6wtdgm6WrAXhe/WAbXN+9x6VFmVC+DT/gJW3uW7JSlzO/M01LDtWsOqkJU SoI6xgHw==; 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 1dBbrY-0006Le-Bh; Fri, 19 May 2017 06:58:12 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBbpb-0004Qz-3l; Fri, 19 May 2017 06:56:14 +0000 Received: by mail-wm0-x243.google.com with SMTP id v4so16186446wmb.2; Thu, 18 May 2017 23:55:54 -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=/mAW2Vlb8AuYjLOiarmUu/+Vh15JRMATUTILqc/cXjY=; b=DejyPGq2WGSXg7QB/gbofqQlELL6qp0VvKPw9YpNcnLEfvMYqszOfajwYjdN/pG4x6 NNgtuHsQYbfwIllYe23cmKjZZUy71+3cxV/GeNSqrGFh1JQQAvzcfegi2vjeQSRRBlGv M6IUBaMDQU60PQmEbO/jRGuGT/Bkh6zUlBED4C028qfbZK8XMVdqw9N4oiY0OHtg+667 srlsVHpmVuBET7XXUZdYz1dgjVaE+kNOM9qAj5xBSO6LSpoLoiq43pHMPTyMDk/N7lMS xnvMNFXaz1IQRpMuRWMdbLY0ofyRx4tobIOG9r1qlCHfv30zEEB/0cC8imGKHEjOvjZK CBIA== 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=/mAW2Vlb8AuYjLOiarmUu/+Vh15JRMATUTILqc/cXjY=; b=mH6EfVQn6XIBTbH0lyqJ818gtXD6F8dACIcW5AyZ1Se289PSjPA4TQ9wJt3BaUWKJZ M9nqpfOXgUKSYD5PDh9w+Fx561E0F1Izbrag2jDGcZcF9Us95v9htcVEUf/iveKoICOJ wsYj3KJoCvkZ48DdtomI82gRoc8+x+Vk03Q2i7uGuDl5Mf1aq0OEdHEgmAlyilC/IJId LDNzNrcIOU8DL4GDWwr8Uw+9nEcLbStdENdf2C0VOmoDXgXIGqRB0H4uEG2EnE2OzwCM D+xNC+O/HDgzjSzE30491iOFNFN0lsB/oQ2sJyR0j4/e/GnSh4oJKufmUUEA5EZ0Thq4 AigA== X-Gm-Message-State: AODbwcBZhpLUVqru+7wUpWL22nxglfE6wpVLfCjEFnKmsjif1yuiEWOP fW3jgPrSVtZacg== X-Received: by 10.28.46.137 with SMTP id u131mr5650917wmu.7.1495176953722; Thu, 18 May 2017 23:55:53 -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.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 May 2017 23:55:53 -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 7/9] crypto: qat - Use IPAD/OPAD constant Date: Fri, 19 May 2017 08:53:29 +0200 Message-Id: <20170519065331.27670-8-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_235611_336352_2745FD0C X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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/qat/qat_common/qat_algs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 20f35df8a01f..5b5efcc52cb5 100644 --- a/drivers/crypto/qat/qat_common/qat_algs.c +++ b/drivers/crypto/qat/qat_common/qat_algs.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -178,8 +179,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))