From: kernel test robot <lkp(a)intel.com>
sound/usb/clock.c:150:9-10: WARNING: return of 0/1 in function
'uac_clock_source_is_valid' 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
Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tree:
https://android.googlesource.com/kernel/goldfish android-3.18
head: dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC
global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago
clock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -147,12 +147,12 @@ static bool uac_clock_source_is_valid(st
snd_usb_find_clock_source(chip->ctrl_intf, source_id);
if (!cs_desc)
- return 0;
+ return false;
/* If a clock source can't tell us whether it's valid, we assume it is */
if (!uac2_control_is_readable(cs_desc->bmControls,
UAC2_CS_CONTROL_CLOCK_VALID - 1))
- return 1;
+ return true;
err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
@@ -164,7 +164,7 @@ static bool uac_clock_source_is_valid(st
dev_warn(&dev->dev,
"%s(): cannot get clock validity for id %d\n",
__func__, source_id);
- return 0;
+ return false;
}
return !!data;