* [PATCH] Input: fix boolreturn.cocci warnings
2018-08-16 2:02 [PATCH V1 3/3] Input: new da7280 haptic driver Roy Im
@ 2018-08-16 6:46 ` kbuild test robot
0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2018-08-16 6:46 UTC (permalink / raw)
To: Roy Im
Cc: kbuild-all, Dmitry Torokhov, Rob Herring, Mark Rutland,
Support Opensource, devicetree, linux-input, linux-kernel
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;
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Input: fix boolreturn.cocci warnings
[not found] <202102181739.Tb984rzG-lkp@intel.com>
@ 2021-02-18 9:59 ` kernel test robot
2021-02-19 3:35 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-02-18 9:59 UTC (permalink / raw)
To: Michael Srba; +Cc: kbuild-all, linux-kernel, Dmitry Torokhov, linux-input
From: kernel test robot <lkp@intel.com>
drivers/input/touchscreen/zinitix.c:250:8-9: WARNING: return of 0/1 in function 'zinitix_init_touch' 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: 26822652c85e ("Input: add zinitix touchscreen driver")
CC: Michael Srba <Michael.Srba@seznam.cz>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f40ddce88593482919761f74910f42f4b84c004b
commit: 26822652c85eff14e40115255727b2693400c524 Input: add zinitix touchscreen driver
zinitix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/input/touchscreen/zinitix.c
+++ b/drivers/input/touchscreen/zinitix.c
@@ -247,7 +247,7 @@ static bool zinitix_init_touch(struct bt
udelay(10);
}
- return 0;
+ return false;
}
static int zinitix_init_regulators(struct bt541_ts_data *bt541)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: fix boolreturn.cocci warnings
2021-02-18 9:59 ` [PATCH] Input: fix boolreturn.cocci warnings kernel test robot
@ 2021-02-19 3:35 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2021-02-19 3:35 UTC (permalink / raw)
To: kernel test robot; +Cc: Michael Srba, kbuild-all, linux-kernel, linux-input
Hi,
On Thu, Feb 18, 2021 at 05:59:53PM +0800, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
>
> drivers/input/touchscreen/zinitix.c:250:8-9: WARNING: return of 0/1 in function 'zinitix_init_touch' 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: 26822652c85e ("Input: add zinitix touchscreen driver")
> CC: Michael Srba <Michael.Srba@seznam.cz>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> ---
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: f40ddce88593482919761f74910f42f4b84c004b
> commit: 26822652c85eff14e40115255727b2693400c524 Input: add zinitix touchscreen driver
>
> zinitix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/input/touchscreen/zinitix.c
> +++ b/drivers/input/touchscreen/zinitix.c
> @@ -247,7 +247,7 @@ static bool zinitix_init_touch(struct bt
> udelay(10);
> }
>
> - return 0;
> + return false;
This is incorrect as function is trying to return error codes. It needs
to be changed to return int. I'll take care of it.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-19 3:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202102181739.Tb984rzG-lkp@intel.com>
2021-02-18 9:59 ` [PATCH] Input: fix boolreturn.cocci warnings kernel test robot
2021-02-19 3:35 ` Dmitry Torokhov
2018-08-16 2:02 [PATCH V1 3/3] Input: new da7280 haptic driver Roy Im
2018-08-16 6:46 ` [PATCH] Input: fix boolreturn.cocci warnings kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox