lkml.org 
[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Input: fix boolreturn.cocci warnings
From: kbuild test robot <fengguang.wu@intel.com>

drivers/input/misc/da7280.c:116:9-10: WARNING: return of 0/1 in function 'da7280_volatile_register' 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: a067f5d53e35 ("Input: new da7280 haptic driver")
CC: Roy Im <roy.im.opensource@diasemi.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

da7280.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/input/misc/da7280.c
+++ b/drivers/input/misc/da7280.c
@@ -113,9 +113,9 @@ static bool da7280_volatile_register(str
case DA7280_IRQ_EVENT_SEQ_DIAG:
case DA7280_IRQ_STATUS1:
case DA7280_TOP_CTL1:
- return 1;
+ return true;
default:
- return 0;
+ return false;
}
}

\
 
 \ /
  Last update: 2018-08-16 08:46    [W:0.078 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site