From patchwork Wed Jun 29 15:18:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zengzhaoxiu@163.com X-Patchwork-Id: 9205759 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 CBD2960752 for ; Wed, 29 Jun 2016 16:43:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCAF328659 for ; Wed, 29 Jun 2016 16:43:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0A8628667; Wed, 29 Jun 2016 16:43:47 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 6F7F728659 for ; Wed, 29 Jun 2016 16:43:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751160AbcF2Qn2 (ORCPT ); Wed, 29 Jun 2016 12:43:28 -0400 Received: from mproxygzc4.163.com ([218.107.63.212]:36482 "EHLO mproxygzc4.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482AbcF2Qn0 (ORCPT ); Wed, 29 Jun 2016 12:43:26 -0400 X-Greylist: delayed 908 seconds by postgrey-1.27 at vger.kernel.org; Wed, 29 Jun 2016 12:43:25 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=F63wqPvTbavaowdZIh DFcz75h4Wb1nvrGpLQQip0MOI=; b=GV3eHoO4wEMVFY76OiTSVF3RTdndo4txoN vNDjomyQPqjZkgfsIYm0n1kMWW6cyytx7yXe7ijNPN4NzIP4qz5ICsHz1vPruy3V SVSukyu08JWa6mcNic1mzVmEUC/ZUdlOnJlBg/qYoMCCZNdjOe36VGtJcqer2R4s PojaxA07Q= Received: from fedora.localdomain (unknown [14.215.33.20]) by smtp11 (Coremail) with SMTP id D8CowAD3ycju5nNXB2chCA--.30058S2; Wed, 29 Jun 2016 23:19:18 +0800 (CST) From: zengzhaoxiu@163.com To: linux-kernel@vger.kernel.org Cc: herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, Zhaoxiu Zeng Subject: [patch V4 30/31] crypto: use parity_long in sahara.c Date: Wed, 29 Jun 2016 23:18:31 +0800 Message-Id: <1467213511-40311-1-git-send-email-zengzhaoxiu@163.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1462958683-26142-1-git-send-email-zengzhaoxiu@163.com> References: <1462958683-26142-1-git-send-email-zengzhaoxiu@163.com> X-CM-TRANSID: D8CowAD3ycju5nNXB2chCA--.30058S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUxPEfDUUUU X-Originating-IP: [14.215.33.20] X-CM-SenderInfo: p2hqw6xkdr5xrx6rljoofrz/xtbBDRaXgFaDnzsk2gAAsD 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 From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- drivers/crypto/sahara.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index c3f3d89..5c44a15 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -783,7 +783,7 @@ static u32 sahara_sha_init_hdr(struct sahara_dev *dev, if (rctx->last) hdr |= SAHARA_HDR_MDHA_PDATA; - if (hweight_long(hdr) % 2 == 0) + if (!parity_long(hdr)) hdr |= SAHARA_HDR_PARITY_BIT; return hdr;