All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:fscache-iter 37/60] fs/fscache/read_helper.c:122:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
@ 2020-07-24  1:52 kernel test robot
  2020-07-24  1:52 ` [PATCH] fscache: fix bugon.cocci warnings kernel test robot
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-07-24  1:52 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   757ac8b16a0edd3befa15c9bdcb2ab3811be945d
commit: e7242eaae0e94cafdcbe04c110ab787715b618b5 [37/60] fscache: Add read helper
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: arm-randconfig-c024-20200723 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

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


coccinelle warnings: (new ones prefixed by >>)

>> fs/fscache/read_helper.c:122:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
   Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30162 bytes --]

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

* [PATCH] fscache: fix bugon.cocci warnings
  2020-07-24  1:52 [dhowells-fs:fscache-iter 37/60] fs/fscache/read_helper.c:122:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2020-07-24  1:52 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-07-24  1:52 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>
CC: linux-cachefs(a)redhat.com
CC: linux-kernel(a)vger.kernel.org

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

fs/fscache/read_helper.c:122:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)

 Use BUG_ON instead of a if condition followed by BUG.

Semantic patch information:
 This makes an effort to find cases where BUG() follows an if
 condition on an expression and replaces the if condition and BUG()
 with a BUG_ON having the conditional expression of the if statement
 as argument.

Generated by: scripts/coccinelle/misc/bugon.cocci

Fixes: e7242eaae0e9 ("fscache: Add read helper")
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   757ac8b16a0edd3befa15c9bdcb2ab3811be945d
commit: e7242eaae0e94cafdcbe04c110ab787715b618b5 [37/60] fscache: Add read helper
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago

Please take the patch only if it's a positive warning. Thanks!

 read_helper.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/fscache/read_helper.c
+++ b/fs/fscache/read_helper.c
@@ -118,8 +118,7 @@ static void fscache_read_copy_to_cache(s
 
 	BUG_ON(work_pending(&req->work));
 	INIT_WORK(&req->work, fscache_do_read_copy_to_cache);
-	if (!queue_work(fscache_op_wq, &req->work))
-		BUG();
+	BUG_ON(!queue_work(fscache_op_wq, &req->work));
 }
 
 /*

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

* [PATCH] fscache: fix bugon.cocci warnings
  2020-06-27 15:14 [dhowells-fs:fscache-iter 38/59] fs/fscache/read_helper.c:88:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2020-06-27 15:14 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-06-27 15:14 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>

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

fs/fscache/read_helper.c:88:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)

 Use BUG_ON instead of a if condition followed by BUG.

Semantic patch information:
 This makes an effort to find cases where BUG() follows an if
 condition on an expression and replaces the if condition and BUG()
 with a BUG_ON having the conditional expression of the if statement
 as argument.

Generated by: scripts/coccinelle/misc/bugon.cocci

Fixes: 2c7d3b597c2d ("fscache: Add read helper")
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   fef70d709fde3f284e93e5baae6591f90e6e4a95
commit: 2c7d3b597c2d56663f17fb0c9921158e5304de04 [38/59] fscache: Add read helper
:::::: branch date: 20 hours ago
:::::: commit date: 23 hours ago

Please take the patch only if it's a positive warning. Thanks!

 read_helper.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/fscache/read_helper.c
+++ b/fs/fscache/read_helper.c
@@ -84,8 +84,7 @@ static void fscache_read_copy_to_cache(s
 
 	BUG_ON(work_pending(&req->work));
 	INIT_WORK(&req->work, fscache_do_read_copy_to_cache);
-	if (!queue_work(fscache_op_wq, &req->work))
-		BUG();
+	BUG_ON(!queue_work(fscache_op_wq, &req->work));
 }
 
 /*

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

* [PATCH] fscache: fix bugon.cocci warnings
  2020-06-15 17:28 [dhowells-fs:fscache-iter 39/60] fs/fscache/read_helper.c:88:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2020-06-15 17:28 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-06-15 17:28 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>
CC: linux-cachefs(a)redhat.com
CC: linux-kernel(a)vger.kernel.org

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

fs/fscache/read_helper.c:88:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)

 Use BUG_ON instead of a if condition followed by BUG.

Semantic patch information:
 This makes an effort to find cases where BUG() follows an if
 condition on an expression and replaces the if condition and BUG()
 with a BUG_ON having the conditional expression of the if statement
 as argument.

Generated by: scripts/coccinelle/misc/bugon.cocci

Fixes: fcea9961a44e ("fscache: Add read helper")
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   a089b9d71e41906ae18dd092be5fa572fbc15df9
commit: fcea9961a44e36a0212bba52c92e63c1985ca295 [39/60] fscache: Add read helper
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

Please take the patch only if it's a positive warning. Thanks!

 read_helper.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/fscache/read_helper.c
+++ b/fs/fscache/read_helper.c
@@ -84,8 +84,7 @@ static void fscache_read_copy_to_cache(s
 
 	BUG_ON(work_pending(&req->work));
 	INIT_WORK(&req->work, fscache_do_read_copy_to_cache);
-	if (!queue_work(fscache_op_wq, &req->work))
-		BUG();
+	BUG_ON(!queue_work(fscache_op_wq, &req->work));
 }
 
 /*

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

* [PATCH] fscache: fix bugon.cocci warnings
  2020-05-16 15:11 [dhowells-fs:fscache-iter 37/61] fs/fscache/read_helper.c:82:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kbuild test robot
@ 2020-05-16 15:11 ` kbuild test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2020-05-16 15:11 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>
CC: linux-cachefs(a)redhat.com
CC: linux-kernel(a)vger.kernel.org

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

fs/fscache/read_helper.c:82:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)

 Use BUG_ON instead of a if condition followed by BUG.

Semantic patch information:
 This makes an effort to find cases where BUG() follows an if
 condition on an expression and replaces the if condition and BUG()
 with a BUG_ON having the conditional expression of the if statement
 as argument.

Generated by: scripts/coccinelle/misc/bugon.cocci

Fixes: 6c92415d2d3a ("fscache: Add read helper")
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   59f33c90ef6c1a75d4af75e5f60d98c0d965b6a2
commit: 6c92415d2d3a9828ec57bd41203f248822ab0b22 [37/61] fscache: Add read helper
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago

Please take the patch only if it's a positive warning. Thanks!

 read_helper.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/fscache/read_helper.c
+++ b/fs/fscache/read_helper.c
@@ -78,8 +78,7 @@ static void fscache_read_copy_to_cache(s
 
 	BUG_ON(work_pending(&req->work));
 	INIT_WORK(&req->work, fscache_do_read_copy_to_cache);
-	if (!queue_work(fscache_op_wq, &req->work))
-		BUG();
+	BUG_ON(!queue_work(fscache_op_wq, &req->work));
 }
 
 /*

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

end of thread, other threads:[~2020-07-24  1:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24  1:52 [dhowells-fs:fscache-iter 37/60] fs/fscache/read_helper.c:122:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2020-07-24  1:52 ` [PATCH] fscache: fix bugon.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-06-27 15:14 [dhowells-fs:fscache-iter 38/59] fs/fscache/read_helper.c:88:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2020-06-27 15:14 ` [PATCH] fscache: fix bugon.cocci warnings kernel test robot
2020-06-15 17:28 [dhowells-fs:fscache-iter 39/60] fs/fscache/read_helper.c:88:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2020-06-15 17:28 ` [PATCH] fscache: fix bugon.cocci warnings kernel test robot
2020-05-16 15:11 [dhowells-fs:fscache-iter 37/61] fs/fscache/read_helper.c:82:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG kbuild test robot
2020-05-16 15:11 ` [PATCH] fscache: fix bugon.cocci warnings kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.