Skip to contentSkip to conversation

media: staging/intel-ipu3: Fix assignment warning

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

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

PATCH v2 1/1 media: staging/intel-ipu3: Fix assignment warning

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

---
Changes in V2:
- Edit the commit message and description.

 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 2 lines · Javier F. Arias

This patch fixes a warning by replacing the integer value with a boolean.

Try one more time and use the imperative.

Starting with "This patch" is not a good idea. We know that it is a patch :) Start with something more informative.

julia

Quoted 31 lines

Issue found by Coccinelle.

---
Changes in V2:
- Edit the commit message and description.

 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/20191102014741.bjt23bzuz6coijgo%40gmail.com.

maintainer
#2 lore raw
In reply to Javier F. Arias
Quoted 2 lines · Javier F. Arias

This patch fixes a warning by replacing the integer value with a boolean.

What "warning"? That term is used to describe things that the compiler spits out, not coccinelle scripts.

Please rephrase this to say exactly what is happening here.

thanks,

greg k-h