linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: allegreo-dvt: fix warning of comparison of 0/1 to bool
@ 2019-11-02  0:42 Jules Irenge
  2019-11-02 10:45 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jules Irenge @ 2019-11-02  0:42 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: julia.lawall, gregkh, m.tretter, linux-kernel, Jules Irenge

Fix warning of comparison of 0/1 to bool variable.
Warning reported by coccinelle tool.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 drivers/staging/media/allegro-dvt/nal-h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/allegro-dvt/nal-h264.c b/drivers/staging/media/allegro-dvt/nal-h264.c
index 4e14b77851e1..bd48b8883572 100644
--- a/drivers/staging/media/allegro-dvt/nal-h264.c
+++ b/drivers/staging/media/allegro-dvt/nal-h264.c
@@ -235,7 +235,7 @@ static inline int rbsp_write_bit(struct rbsp *rbsp, bool value)
 
 	rbsp->pos++;
 
-	if (value == 1 ||
+	if (value ||
 	    (rbsp->num_consecutive_zeros < 7 && (rbsp->pos % 8 == 0))) {
 		rbsp->num_consecutive_zeros = 0;
 	} else {
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: allegreo-dvt: fix warning of comparison of 0/1 to bool
  2019-11-02  0:42 [PATCH] staging: allegreo-dvt: fix warning of comparison of 0/1 to bool Jules Irenge
@ 2019-11-02 10:45 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-11-02 10:45 UTC (permalink / raw)
  To: Jules Irenge; +Cc: outreachy-kernel, julia.lawall, m.tretter, linux-kernel

On Sat, Nov 02, 2019 at 12:42:13AM +0000, Jules Irenge wrote:
> Fix warning of comparison of 0/1 to bool variable.

Again, this isn't a "warning", but just a coccinelle-noticed
recommendation.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-02 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02  0:42 [PATCH] staging: allegreo-dvt: fix warning of comparison of 0/1 to bool Jules Irenge
2019-11-02 10:45 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).