Skip to contentSkip to conversation

drm/omap: remove unneeded conversions to bool

PATCH Superseded Andrew F. Davis 2 participants 2 messages Jul 1, 2016 – Aug 11, 2016

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/omap: remove unneeded conversions to bool

Found with scripts/coccinelle/misc/boolconv.cocci.

---
 drivers/gpu/drm/omapdrm/dss/dispc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/omapdrm/dss/dispc.c +3 -3
index f83608b..495094b 100644
@@ -1655,7 +1655,7 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
 {
 	int scale_x = out_width != orig_width;
 	int scale_y = out_height != orig_height;
-	bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
+	bool chroma_upscale = plane != OMAP_DSS_WB;
 
 	if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
 		return;
@@ -3086,9 +3086,9 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
 		unsigned long pclk)
 {
 	if (dss_mgr_is_lcd(channel))
-		return pclk <= dispc.feat->max_lcd_pclk ? true : false;
+		return pclk <= dispc.feat->max_lcd_pclk;
 	else
-		return pclk <= dispc.feat->max_tv_pclk ? true : false;
+		return pclk <= dispc.feat->max_tv_pclk;
 }
 
 bool dispc_mgr_timings_ok(enum omap_channel channel,
Signature · 1 line
2.9.0
#1 lore raw
Quoted 23 lines · Andrew F. Davis

Found with scripts/coccinelle/misc/boolconv.cocci.

---
 drivers/gpu/drm/omapdrm/dss/dispc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/omapdrm/dss/dispc.c +1 -1
index f83608b..495094b 100644
@@ -1655,7 +1655,7 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
 {
 	int scale_x = out_width != orig_width;
 	int scale_y = out_height != orig_height;
-	bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
+	bool chroma_upscale = plane != OMAP_DSS_WB;
 
 	if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
 		return;
@@ -3086,9 +3086,9 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
 		unsigned long pclk)

drivers/gpu/drm/omapdrm/dss/dispc.c static bool _dispc_mgr_pclk_ok(enum omap_channel channel, · line 3094

Quoted 10 lines
drivers/gpu/drm/omapdrm/dss/dispc.c +2 -2
 {
 	if (dss_mgr_is_lcd(channel))
-		return pclk <= dispc.feat->max_lcd_pclk ? true : false;
+		return pclk <= dispc.feat->max_lcd_pclk;
 	else
-		return pclk <= dispc.feat->max_tv_pclk ? true : false;
+		return pclk <= dispc.feat->max_tv_pclk;
 }
 
 bool dispc_mgr_timings_ok(enum omap_channel channel,

Thanks, queued for v4.9.

Tomi