]> git.baikalelectronics.ru Git - kernel.git/commit
lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t()
authorJiangshan Yi <yijiangshan@kylinos.cn>
Thu, 14 Jul 2022 01:54:41 +0000 (09:54 +0800)
committerakpm <akpm@linux-foundation.org>
Sat, 30 Jul 2022 01:12:34 +0000 (18:12 -0700)
commit52d4f643c00d082bc1d582b33c3f2f03421276a0
tree58b2344ab654273d2e35ab30433fea7c265a6e10
parent8b4fae14f43004c08984cdbe054c35bf72342735
lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t()

Fix the following coccicheck warning:

lib/lzo/lzo1x_compress.c:54: WARNING opportunity for min().
lib/lzo/lzo1x_compress.c:329: WARNING opportunity for min().

min() and min_t() macro is defined in include/linux/minmax.h.  It avoids
multiple evaluations of the arguments when non-constant and performs
strict type-checking.

Link: https://lkml.kernel.org/r/20220714015441.1313036-1-13667453960@163.com
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Tested-by: Dave Rodgman <dave.rodgman@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/lzo/lzo1x_compress.c