Skip to contentSkip to conversation

media: staging/intel-ipu3: Fix wrong assignment to boolean variable

PATCH In review Javier F. Arias 2 participants 3 messages Nov 1, 2019 – Nov 2, 2019

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

PATCH 1/1 media: staging/intel-ipu3: Fix wrong assignment to boolean variable

This patch fixes a warning by replacing the incorrect value with a boolean.
Issue found by Coccinelle.

---
 drivers/staging/media/ipu3/ipu3-css.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3-css.c +1 -1
index fd1ed84c400c..f36de501edc6 100644
@@ -1450,7 +1450,7 @@ bool imgu_css_pipe_queue_empty(struct imgu_css *css, unsigned int pipe)
 bool imgu_css_queue_empty(struct imgu_css *css)
 {
 	unsigned int pipe;
-	bool ret = 0;
+	bool ret = false;
 
 	for (pipe = 0; pipe < IMGU_MAX_PIPE_NUM; pipe++)
 		ret &= imgu_css_pipe_queue_empty(css, pipe);
Signature · 1 line
2.20.1
#1 lore raw
Quoted 3 lines · Javier F. Arias

This patch fixes a warning by replacing the incorrect value with a boolean.
Issue found by Coccinelle.

The value is not really incorrect or wrong. It is just not expressed in an ideal way.

julia

Quoted 27 lines
---
 drivers/staging/media/ipu3/ipu3-css.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3-css.c +1 -2
index fd1ed84c400c..f36de501edc6 100644
@@ -1450,7 +1450,7 @@ bool imgu_css_pipe_queue_empty(struct imgu_css *css, unsigned int pipe)
 bool imgu_css_queue_empty(struct imgu_css *css)
 {
 	unsigned int pipe;
-	bool ret = 0;
+	bool ret = false;
 
 	for (pipe = 0; pipe < IMGU_MAX_PIPE_NUM; pipe++)
 		ret &= imgu_css_pipe_queue_empty(css, pipe);
--

2.20.1

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191101171914.rphvreggpu6qj77e%40gmail.com.

#2 lore raw

Thanks for your feedback. I'll edit the subject.

Quoted 40 lines · Julia Lawall
Quoted 3 lines · Javier F. Arias

This patch fixes a warning by replacing the incorrect value with a boolean.
Issue found by Coccinelle.

The value is not really incorrect or wrong. It is just not expressed in an ideal way.

julia

Quoted 27 lines
---
 drivers/staging/media/ipu3/ipu3-css.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3-css.c +1 -2
index fd1ed84c400c..f36de501edc6 100644
@@ -1450,7 +1450,7 @@ bool imgu_css_pipe_queue_empty(struct imgu_css *css, unsigned int pipe)
 bool imgu_css_queue_empty(struct imgu_css *css)
 {
 	unsigned int pipe;
-	bool ret = 0;
+	bool ret = false;
 
 	for (pipe = 0; pipe < IMGU_MAX_PIPE_NUM; pipe++)
 		ret &= imgu_css_pipe_queue_empty(css, pipe);
--

2.20.1

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191101171914.rphvreggpu6qj77e%40gmail.com.