Skip to contentSkip to conversation

drm/sun4i: remove no need type conversion to bool

PATCH In review Bernard Zhao 2 participants 2 messages Nov 16, 2021 – Nov 19, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/sun4i: remove no need type conversion to bool

This change is to cleanup the code a bit.

---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +1 -1
index fbf7da9d9592..25e6f85fed0b 100644
@@ -49,7 +49,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long rate,
 			    (rate - tmp_rate) < (rate - best_rate)) {
 				best_rate = tmp_rate;
 				best_m = m;
-				is_double = (d == 2) ? true : false;
+				is_double = (d == 2);
 			}
 		}
 	}
Signature · 1 line
2.33.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Bernard!

Dne torek, 16. november 2021 ob 03:14:49 CET je Bernard Zhao napisal(a):

Quoted 3 lines

This change is to cleanup the code a bit.

Best regards,
Jernej

drivers/gpu/drm/

Quoted 5 lines
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ renamed from drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +0 -0

sun4i/sun4i_hdmi_tmds_clk.c

drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c static unsigned long sun4i_tmds_calc_divider(unsigned long

Quoted 4 lines

index fbf7da9d9592..25e6f85fed0b 100644

drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +0 -0
@@ -49,7 +49,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long 

rate,

drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c static unsigned long sun4i_tmds_calc_divider(unsigned long · line 49

Quoted 1 line
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +0 -0
 			    (rate - tmp_rate) < (rate - best_rate)) 

{

drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c static unsigned long sun4i_tmds_calc_divider(unsigned long rate,

Quoted 3 lines
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +0 -1
 				best_rate = tmp_rate;
 				best_m = m;
-				is_double = (d == 2) ? true : 

false;

Quoted 8 lines
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +1 -0
+				is_double = (d == 2);
 			}
 		}
 	}
Signature · 1 line
2.33.1