]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/sti: Remove redundant ternary operators
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Thu, 4 Sep 2025 11:27:38 +0000 (19:27 +0800)
committerRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Fri, 5 Sep 2025 11:17:21 +0000 (13:17 +0200)
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>
drivers/gpu/drm/sti/sti_hqvdp.c

index 03684062309bbb9915d47fa6e6475cbb6c7beaaa..b76606e9a82d4c8836de9a3425ce69052ecce4a6 100644 (file)
@@ -744,7 +744,7 @@ static bool sti_hqvdp_check_hw_scaling(struct sti_hqvdp *hqvdp,
 
        inv_zy = DIV_ROUND_UP(src_h, dst_h);
 
-       return (inv_zy <= lfw) ? true : false;
+       return inv_zy <= lfw;
 }
 
 /**