* drivers/input/touchscreen/zinitix.c:250:8-9: WARNING: return of 0/1 in function 'zinitix_init_touch' with return type bool
@ 2021-02-18 9:59 kernel test robot
2021-02-18 9:59 ` [PATCH] Input: fix boolreturn.cocci warnings kernel test robot
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
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f40ddce88593482919761f74910f42f4b84c004b
commit: 26822652c85eff14e40115255727b2693400c524 Input: add zinitix touchscreen driver
date: 5 months ago
config: x86_64-randconfig-c002-20210216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/input/touchscreen/zinitix.c:250:8-9: WARNING: return of 0/1 in function 'zinitix_init_touch' with return type bool
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30305 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Input: fix boolreturn.cocci warnings
2021-02-18 9:59 drivers/input/touchscreen/zinitix.c:250:8-9: WARNING: return of 0/1 in function 'zinitix_init_touch' with return type bool kernel test robot
@ 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 --
2021-02-18 9:59 drivers/input/touchscreen/zinitix.c:250:8-9: WARNING: return of 0/1 in function 'zinitix_init_touch' with return type bool kernel test robot
2021-02-18 9:59 ` [PATCH] Input: fix boolreturn.cocci warnings kernel test robot
2021-02-19 3:35 ` Dmitry Torokhov
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).