Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/sti: Remove redundant ternary operators

For ternary operators in the form of "a ? true : false", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Acked-by: Raphaël Gallais-Pou <rgallaispou@gmail.com>
Link: https://lore.kernel.org/r/20250904112738.350652-1-liaoyuanhong@vivo.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>

authored by

Liao Yuanhong and committed by
Raphael Gallais-Pou
7a9b19cc 2c907d85

+1 -1
+1 -1
drivers/gpu/drm/sti/sti_hqvdp.c
··· 744 744 745 745 inv_zy = DIV_ROUND_UP(src_h, dst_h); 746 746 747 - return (inv_zy <= lfw) ? true : false; 747 + return inv_zy <= lfw; 748 748 } 749 749 750 750 /**