Skip to contentSkip to conversation

staging: media: mt9m114: Use true/false instead of 1/0 for bool initialisations

PATCH In review sayli karnik 2 participants 2 messages Mar 10, 2017

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

PATCH 1/1 staging: media: mt9m114: Use true/false instead of 1/0 for bool initialisations

Bool initializations should use true and false instead of 1 and 0. Detected by coccinelle/misc/boolinit.cocci.

---
 drivers/staging/media/atomisp/i2c/mt9m114.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/i2c/mt9m114.c +2 -2
index 1b79cdb..60ba6f9 100644
@@ -926,10 +926,10 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
 		for (index = 0; index < N_RES; index++) {
 			if ((width == mt9m114_res[index].width) &&
 			    (height == mt9m114_res[index].height)) {
-				mt9m114_res[index].used = 1;
+				mt9m114_res[index].used = true;
 				continue;
 			}
-			mt9m114_res[index].used = 0;
+			mt9m114_res[index].used = false;
 		}
 	}
 	ret = mt9m114_get_intg_factor(c, mt9m114_info,
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · sayli karnik

Bool initializations should use true and false instead of 1 and 0. Detected by coccinelle/misc/boolinit.cocci.

There is also code to update in the header file that defines the mt9m114_res array.

julia

Quoted 31 lines
---
 drivers/staging/media/atomisp/i2c/mt9m114.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/i2c/mt9m114.c +2 -3
index 1b79cdb..60ba6f9 100644
@@ -926,10 +926,10 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
 		for (index = 0; index < N_RES; index++) {
 			if ((width == mt9m114_res[index].width) &&
 			    (height == mt9m114_res[index].height)) {
-				mt9m114_res[index].used = 1;
+				mt9m114_res[index].used = true;
 				continue;
 			}
-			mt9m114_res[index].used = 0;
+			mt9m114_res[index].used = false;
 		}
 	}
 	ret = mt9m114_get_intg_factor(c, mt9m114_info,
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170310083218.GA23882%40sayli-HP-15-Notebook-PC.
For more options, visit https://groups.google.com/d/optout.