From aa8df2fe8f1a3929d7677eab82c1ecfad0dde70f Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 10 Jun 2020 18:41:32 -0700 Subject: [PATCH] lib/lz4/lz4_decompress.c: document deliberate use of `&' This operation was intentional, but tools such as smatch will warn that it might not have been. Signed-off-by: Andrew Morton Change-Id: I6547e009a39736fe2184d285e1402333e2c03994 Cc: Yann Collet Cc: Vasily Averin Cc: Gao Xiang Link: http://lkml.kernel.org/r/3bf931c6ea0cae3e23f3485801986859851b4f04.camel@perches.com Signed-off-by: Linus Torvalds Signed-off-by: Adam W. Willis Signed-off-by: clarencelol Signed-off-by: Anush02198 Signed-off-by: Divyanshu-Modi Signed-off-by: Tashfin Shakeer Rhythm (cherry picked from commit e25209bfd6bc3c16a57f87092ae24a0f8b35fb8e) Signed-off-by: TogoFire Signed-off-by: Kanishk Signed-off-by: Sorayukii --- lib/lz4/lz4_decompress.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c index cda8b794da04..8a7724a6ce2f 100644 --- a/lib/lz4/lz4_decompress.c +++ b/lib/lz4/lz4_decompress.c @@ -141,6 +141,9 @@ static FORCE_INLINE int LZ4_decompress_generic( * space in the output for those 18 bytes earlier, upon * entering the shortcut (in other words, there is a * combined check for both stages). + * + * The & in the likely() below is intentionally not && so that + * some compilers can produce better parallelized runtime code */ if ((endOnInput ? length != RUN_MASK : length <= 8) /*