diff mbox

[V4,30/31] crypto: use parity_long is sahara.c

Message ID 1462958683-26142-1-git-send-email-zengzhaoxiu@163.com (mailing list archive)
State Not Applicable
Delegated to: Herbert Xu
Headers show

Commit Message

zengzhaoxiu@163.com May 11, 2016, 9:24 a.m. UTC
From: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>

Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
---
 drivers/crypto/sahara.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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;