Commit 62a83183 authored by Peter Senna Tschudin's avatar Peter Senna Tschudin Committed by Tomi Valkeinen

OMAPDSS: DISPC: Fix assignment of 0/1 to bool variables

Convert 0 to false and 1 to true when assigning values to bool
variables. Inspired by commit 3db1cd5c.

The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):

@@
bool b;
@@
(
-b = 0
+b = false
|
-b = 1
+b = true
)
Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 24586d83
...@@ -2352,7 +2352,7 @@ int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel, ...@@ -2352,7 +2352,7 @@ int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel,
{ {
enum omap_overlay_caps caps = dss_feat_get_overlay_caps(plane); enum omap_overlay_caps caps = dss_feat_get_overlay_caps(plane);
bool five_taps = true; bool five_taps = true;
bool fieldmode = 0; bool fieldmode = false;
u16 in_height = oi->height; u16 in_height = oi->height;
u16 in_width = oi->width; u16 in_width = oi->width;
bool ilace = timings->interlace; bool ilace = timings->interlace;
...@@ -2365,7 +2365,7 @@ int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel, ...@@ -2365,7 +2365,7 @@ int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel,
out_height = oi->out_height == 0 ? oi->height : oi->out_height; out_height = oi->out_height == 0 ? oi->height : oi->out_height;
if (ilace && oi->height == out_height) if (ilace && oi->height == out_height)
fieldmode = 1; fieldmode = true;
if (ilace) { if (ilace) {
if (fieldmode) if (fieldmode)
...@@ -2396,7 +2396,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, ...@@ -2396,7 +2396,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
bool mem_to_mem) bool mem_to_mem)
{ {
bool five_taps = true; bool five_taps = true;
bool fieldmode = 0; bool fieldmode = false;
int r, cconv = 0; int r, cconv = 0;
unsigned offset0, offset1; unsigned offset0, offset1;
s32 row_inc; s32 row_inc;
...@@ -2417,7 +2417,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, ...@@ -2417,7 +2417,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
out_height = out_height == 0 ? height : out_height; out_height = out_height == 0 ? height : out_height;
if (ilace && height == out_height) if (ilace && height == out_height)
fieldmode = 1; fieldmode = true;
if (ilace) { if (ilace) {
if (fieldmode) if (fieldmode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment