linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] crypto: sha256-mb - cleanup a || vs | typo
@ 2016-06-29 14:42 Dan Carpenter
  2016-06-29 17:05 ` H. Peter Anvin
  0 siblings, 1 reply; 19+ messages in thread
From: Dan Carpenter @ 2016-06-29 14:42 UTC (permalink / raw)
  To: Herbert Xu
  Cc: David S. Miller, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Tim Chen, Megha Dey, Wang, Rui Y, Denys Vlasenko,
	Xiaodong Liu, linux-crypto, linux-kernel, kernel-janitors

|| and | behave basically the same here but || is intended.  It causes a
static checker warning to mix up bitwise and logical operations.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/arch/x86/crypto/sha256-mb/sha256_mb.c b/arch/x86/crypto/sha256-mb/sha256_mb.c
index c9d5dcc..4ec895a 100644
--- a/arch/x86/crypto/sha256-mb/sha256_mb.c
+++ b/arch/x86/crypto/sha256-mb/sha256_mb.c
@@ -299,7 +299,7 @@ static struct sha256_hash_ctx *sha256_ctx_mgr_submit(struct sha256_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 < SHA256_BLOCK_SIZE)) {
+	if ((ctx->partial_block_buffer_length) || (len < SHA256_BLOCK_SIZE)) {
 		/* Compute how many bytes to copy from user buffer into
 		 * extra block
 		 */

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-07-18 22:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29 14:42 [patch] crypto: sha256-mb - cleanup a || vs | typo Dan Carpenter
2016-06-29 17:05 ` H. Peter Anvin
2016-06-30  7:50   ` Dan Carpenter
2016-06-30 11:16     ` Joe Perches
2016-06-30 11:45       ` walter harms
2016-06-30 12:33         ` Dan Carpenter
2016-06-30 20:42   ` Tim Chen
2016-06-30 22:16     ` Dan Carpenter
2016-07-01  7:55     ` Ingo Molnar
2016-07-01  9:28       ` Herbert Xu
2016-07-01 10:13         ` Ingo Molnar
2016-07-08 16:28           ` Tim Chen
2016-07-08 16:45             ` Herbert Xu
2016-07-08 17:17               ` Tim Chen
2016-07-08 17:19               ` Linus Torvalds
2016-07-11  6:40                 ` Geert Uytterhoeven
2016-07-18  8:59                 ` Pavel Machek
2016-07-18 22:12                   ` Tim Chen
2016-07-11 10:09             ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).