From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbcF2OoW (ORCPT ); Wed, 29 Jun 2016 10:44:22 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33864 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753003AbcF2OnO (ORCPT ); Wed, 29 Jun 2016 10:43:14 -0400 Date: Wed, 29 Jun 2016 17:42:17 +0300 From: Dan Carpenter To: Herbert Xu Cc: "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Megha Dey , Tim Chen , Xiaodong Liu , Denys Vlasenko , "Wang, Rui Y" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] crypto: sha1-mb - cleanup a small | vs || typo Message-ID: <20160629144216.GD22818@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org || and | behave basically the same here but || was intended. It causes a static checker warning when we mix up logical and bitwise operations. Signed-off-by: Dan Carpenter diff --git a/arch/x86/crypto/sha1-mb/sha1_mb.c b/arch/x86/crypto/sha1-mb/sha1_mb.c index 561b286..96d80ad 100644 --- a/arch/x86/crypto/sha1-mb/sha1_mb.c +++ b/arch/x86/crypto/sha1-mb/sha1_mb.c @@ -304,7 +304,7 @@ static struct sha1_hash_ctx *sha1_ctx_mgr_submit(struct sha1_ctx_mgr *mgr, * Or if the user's buffer contains less than a whole block, * append as much as possible to the extra block. */ - if ((ctx->partial_block_buffer_length) | (len < SHA1_BLOCK_SIZE)) { + if ((ctx->partial_block_buffer_length) || (len < SHA1_BLOCK_SIZE)) { /* * Compute how many bytes to copy from user buffer into * extra block