[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250904112738.350652-1-liaoyuanhong@vivo.com>
Date: Thu, 4 Sep 2025 19:27:38 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Alain Volmat <alain.volmat@...s.st.com>,
Raphael Gallais-Pou <rgallaispou@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
dri-devel@...ts.freedesktop.org (open list:DRM DRIVERS FOR STI),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] 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@...o.com>
---
drivers/gpu/drm/sti/sti_hqvdp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 03684062309b..b76606e9a82d 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -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;
}
/**
--
2.34.1
Powered by blists - more mailing lists