[linuxtv-media:master 488/499] drivers/media/dvb-frontends/si2165.c:324:10-11: WARNING: return of 0/1 in function 'si2165_wait_init_done' with return type bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://linuxtv.org/media_tree.git master
head:   7f196789b3ffee243b681d3e7dab8890038db856
commit: 36efec48e2e6016e05364906720a0ec350a5d768 [488/499] [media] cx23885: Add si2165 support for HVR-5500


coccinelle warnings: (new ones prefixed by >>)

>> drivers/media/dvb-frontends/si2165.c:324:10-11: WARNING: return of 0/1 in function 'si2165_wait_init_done' with return type bool
--
>> drivers/media/dvb-frontends/si2165.c:925:3-32: duplicated argument to & or |

Please consider folding the attached diff :-)

---
0-DAY kernel build testing backend              Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
From: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Subject: [PATCH] [media] cx23885: fix coccinelle warnings
TO: Mauro Carvalho Chehab <m.chehab@xxxxxxxxxxx>
CC: Matthias Schwarzott <zzam@xxxxxxxxxx>
CC: linux-media@xxxxxxxxxxxxxxx 
CC: linux-kernel@xxxxxxxxxxxxxxx 

drivers/media/dvb-frontends/si2165.c:324:10-11: WARNING: return of 0/1 in function 'si2165_wait_init_done' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Matthias Schwarzott <zzam@xxxxxxxxxx>
CC: Mauro Carvalho Chehab <m.chehab@xxxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

 si2165.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -321,7 +321,7 @@ static bool si2165_wait_init_done(struct
 	for (i = 0; i < 3; ++i) {
 		si2165_readreg8(state, 0x0054, &val);
 		if (val == 0x01)
-			return 0;
+			return false;
 		usleep_range(1000, 50000);
 	}
 	dev_err(&state->i2c->dev, "%s: init_done was not set\n",

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux