linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' with return type bool
@ 2021-05-15 23:03 kernel test robot
  2021-05-15 23:03 ` [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings kernel test robot
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2021-05-15 23:03 UTC (permalink / raw)
  To: Bodo Stroesser; +Cc: kbuild-all, linux-kernel, Martin K. Petersen

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c12a29ed9094b4b9cde8965c12850460b9a79d7c
commit: 9814b55cde0588b6d9bc496cee43f87316cbc6f1 scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
date:   2 weeks ago
config: x86_64-randconfig-c022-20210516 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' 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: 39031 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings
  2021-05-15 23:03 drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' with return type bool kernel test robot
@ 2021-05-15 23:03 ` kernel test robot
  2021-05-16 16:24   ` Bodo Stroesser
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: kernel test robot @ 2021-05-15 23:03 UTC (permalink / raw)
  To: Bodo Stroesser
  Cc: kbuild-all, linux-kernel, Martin K. Petersen, linux-scsi, target-devel

From: kernel test robot <lkp@intel.com>

drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' 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: 9814b55cde05 ("scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found")
CC: Bodo Stroesser <bostroesser@gmail.com>
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:   c12a29ed9094b4b9cde8965c12850460b9a79d7c
commit: 9814b55cde0588b6d9bc496cee43f87316cbc6f1 scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
:::::: branch date: 6 hours ago
:::::: commit date: 2 weeks ago

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

--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -1421,7 +1421,7 @@ static bool tcmu_handle_completions(stru
 
 	if (test_bit(TCMU_DEV_BIT_BROKEN, &udev->flags)) {
 		pr_err("ring broken, not handling completions\n");
-		return 0;
+		return false;
 	}
 
 	mb = udev->mb_addr;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings
  2021-05-15 23:03 ` [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings kernel test robot
@ 2021-05-16 16:24   ` Bodo Stroesser
  2021-05-21 21:14   ` Martin K. Petersen
  2021-05-26  4:07   ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Bodo Stroesser @ 2021-05-16 16:24 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, linux-kernel, Martin K. Petersen, linux-scsi, target-devel

On 16.05.21 01:03, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' 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: 9814b55cde05 ("scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found")
> CC: Bodo Stroesser <bostroesser@gmail.com>
> 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:   c12a29ed9094b4b9cde8965c12850460b9a79d7c
> commit: 9814b55cde0588b6d9bc496cee43f87316cbc6f1 scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
> :::::: branch date: 6 hours ago
> :::::: commit date: 2 weeks ago
> 
>   target_core_user.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -1421,7 +1421,7 @@ static bool tcmu_handle_completions(stru
>   
>   	if (test_bit(TCMU_DEV_BIT_BROKEN, &udev->flags)) {
>   		pr_err("ring broken, not handling completions\n");
> -		return 0;
> +		return false;
>   	}
>   
>   	mb = udev->mb_addr;
> 

Acked-by: Bodo Stroesser <bostroesser@gmail.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings
  2021-05-15 23:03 ` [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings kernel test robot
  2021-05-16 16:24   ` Bodo Stroesser
@ 2021-05-21 21:14   ` Martin K. Petersen
  2021-05-26  4:07   ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-05-21 21:14 UTC (permalink / raw)
  To: kernel test robot
  Cc: Bodo Stroesser, kbuild-all, linux-kernel, Martin K. Petersen,
	linux-scsi, target-devel


> From: kernel test robot <lkp@intel.com>
>
> drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' 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

Applied to 5.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings
  2021-05-15 23:03 ` [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings kernel test robot
  2021-05-16 16:24   ` Bodo Stroesser
  2021-05-21 21:14   ` Martin K. Petersen
@ 2021-05-26  4:07   ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-05-26  4:07 UTC (permalink / raw)
  To: kernel test robot, Bodo Stroesser
  Cc: Martin K . Petersen, target-devel, linux-kernel, linux-scsi, kbuild-all

On Sun, 16 May 2021 07:03:58 +0800, kernel test robot wrote:

> drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' 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

Applied to 5.14/scsi-queue, thanks!

[1/1] scsi: target: tcmu: fix boolreturn.cocci warnings
      https://git.kernel.org/mkp/scsi/c/824731258b65

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-26  4:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 23:03 drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' with return type bool kernel test robot
2021-05-15 23:03 ` [PATCH] scsi: target: tcmu: fix boolreturn.cocci warnings kernel test robot
2021-05-16 16:24   ` Bodo Stroesser
2021-05-21 21:14   ` Martin K. Petersen
2021-05-26  4:07   ` Martin K. Petersen

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).