All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:netfs-folio-regions 19/33] fs/netfs/objects.c:213:5-8: WARNING: Use BUG_ON instead of if condition followed by BUG.
@ 2021-08-25 14:19 kernel test robot
  2021-08-25 14:19 ` [PATCH] netfs: fix bugon.cocci warnings kernel test robot
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2021-08-25 14:19 UTC (permalink / raw)
  To: kbuild

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

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions
head:   bee78a1e3c9ae86d025b0b8f44c2553228fd9d2c
commit: 8a707302ba31d8577118fd7ccb24a8263a67f342 [19/33] netfs: Initiate write request from a dirty region
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: arm-randconfig-c023-20210824 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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>


cocci warnings: (new ones prefixed by >>)
>> fs/netfs/objects.c:213:5-8: 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: 40537 bytes --]

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

* [PATCH] netfs: fix bugon.cocci warnings
  2021-08-25 14:19 [dhowells-fs:netfs-folio-regions 19/33] fs/netfs/objects.c:213:5-8: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2021-08-25 14:19 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-08-25 14:19 UTC (permalink / raw)
  To: kbuild

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

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

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

fs/netfs/objects.c:213:5-8: 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: 8a707302ba31 ("netfs: Initiate write request from a dirty region")
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/dhowells/linux-fs.git netfs-folio-regions
head:   bee78a1e3c9ae86d025b0b8f44c2553228fd9d2c
commit: 8a707302ba31d8577118fd7ccb24a8263a67f342 [19/33] netfs: Initiate write request from a dirty region
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago

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

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

--- a/fs/netfs/objects.c
+++ b/fs/netfs/objects.c
@@ -209,8 +209,7 @@ void netfs_put_write_request(struct netf
 		if (dead) {
 			if (was_async) {
 				wreq->work.func = netfs_free_write_request;
-				if (!queue_work(system_unbound_wq, &wreq->work))
-					BUG();
+				BUG_ON(!queue_work(system_unbound_wq, &wreq->work));
 			} else {
 				netfs_free_write_request(&wreq->work);
 			}

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

* [PATCH] netfs: fix bugon.cocci warnings
  2021-08-24  6:59 [dhowells-fs:netfs-folio-regions 28/33] fs/netfs/write_back.c:319:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2021-08-24  6:59 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-08-24  6:59 UTC (permalink / raw)
  To: kbuild

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

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

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

fs/netfs/write_back.c:319:3-6: 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)
fs/netfs/write_back.c:324:3-6: 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)
fs/netfs/write_back.c:279: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: ce5c3cd2f999 ("netfs: Dispatch write operations to process a write request")
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/dhowells/linux-fs.git netfs-folio-regions
head:   bee78a1e3c9ae86d025b0b8f44c2553228fd9d2c
commit: ce5c3cd2f9998463d1ae093fd84fe5b0fa490ce1 [28/33] netfs: Dispatch write operations to process a write request
:::::: branch date: 10 hours ago
:::::: commit date: 11 hours ago

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

 write_back.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/fs/netfs/write_back.c
+++ b/fs/netfs/write_back.c
@@ -275,8 +275,7 @@ static void netfs_set_folios_writeback_w
 		wreq->work.func = netfs_writeback_worker;
 	}
 
-	if (!queue_work(system_unbound_wq, &wreq->work))
-		BUG();
+	BUG_ON(!queue_work(system_unbound_wq, &wreq->work));
 }
 
 /*
@@ -315,13 +314,11 @@ static int netfs_begin_write(struct netf
 	ret = netfs_lock_folios(wreq, may_wait);
 	if (ret < 0) {
 		wreq->work.func = netfs_set_folios_writeback_work;
-		if (!queue_work(system_unbound_wq, &wreq->work))
-			BUG();
+		BUG_ON(!queue_work(system_unbound_wq, &wreq->work));
 	} else {
 		netfs_mark_folios_for_writeback(wreq, wreq->first, wreq->last);
 		netfs_unlock_folios(wreq->mapping, wreq->first, wreq->last);
-		if (!queue_work(system_unbound_wq, &wreq->work))
-			BUG();
+		BUG_ON(!queue_work(system_unbound_wq, &wreq->work));
 	}
 	_leave(" = %lu", wreq->last - wreq->first + 1);
 	return wreq->last - wreq->first + 1;

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

* [PATCH] netfs: fix bugon.cocci warnings
  2021-01-19  3:49 [dhowells-fs:fscache-netfs-lib 7/24] fs/netfs/read_helper.c:358:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2021-01-19  3:49 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-01-19  3:49 UTC (permalink / raw)
  To: kbuild

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

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

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

fs/netfs/read_helper.c:358:3-6: 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: fccc99303862 ("netfs: Add tracepoints")
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/dhowells/linux-fs.git fscache-netfs-lib
head:   0a07376eda989942c359abca4f8d3b007487e431
commit: fccc9930386296ef4c1ea6cc9c6b3350267ea8d3 [7/24] netfs: Add tracepoints
:::::: branch date: 5 hours ago
:::::: commit date: 5 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/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -354,8 +354,7 @@ static void netfs_rreq_terminated(struct
 {
 	if (test_bit(NETFS_RREQ_INCOMPLETE_IO, &rreq->flags) &&
 	    in_softirq()) {
-		if (!queue_work(system_unbound_wq, &rreq->work))
-			BUG();
+		BUG_ON(!queue_work(system_unbound_wq, &rreq->work));
 	} else {
 		netfs_rreq_assess(rreq);
 	}

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

* [PATCH] netfs: fix bugon.cocci warnings
  2020-11-04  2:57 [dhowells-fs:fscache-iter 33/75] fs/netfs/read_helper.c:338:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2020-11-04  2:57 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-11-04  2:57 UTC (permalink / raw)
  To: kbuild

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

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

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

fs/netfs/read_helper.c:338:3-6: 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: f9a76c4c46fb ("netfs: Provide readahead and readpage netfs helpers")
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:   5493a885b6784d683ee7b4d40be8c56f3ad23939
commit: f9a76c4c46fb82c1c3e6103257a4f987ef1c026d [33/75] netfs: Provide readahead and readpage netfs helpers
:::::: branch date: 13 hours ago
:::::: commit date: 15 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/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -334,8 +334,7 @@ static void netfs_rreq_terminated(struct
 {
 	if (test_bit(NETFS_RREQ_INCOMPLETE_IO, &rreq->flags) &&
 	    in_softirq()) {
-		if (!queue_work(system_unbound_wq, &rreq->work))
-			BUG();
+		BUG_ON(!queue_work(system_unbound_wq, &rreq->work));
 	} else {
 		netfs_rreq_assess(rreq);
 	}

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

end of thread, other threads:[~2021-08-25 14:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 14:19 [dhowells-fs:netfs-folio-regions 19/33] fs/netfs/objects.c:213:5-8: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2021-08-25 14:19 ` [PATCH] netfs: fix bugon.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-08-24  6:59 [dhowells-fs:netfs-folio-regions 28/33] fs/netfs/write_back.c:319:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2021-08-24  6:59 ` [PATCH] netfs: fix bugon.cocci warnings kernel test robot
2021-01-19  3:49 [dhowells-fs:fscache-netfs-lib 7/24] fs/netfs/read_helper.c:358:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2021-01-19  3:49 ` [PATCH] netfs: fix bugon.cocci warnings kernel test robot
2020-11-04  2:57 [dhowells-fs:fscache-iter 33/75] fs/netfs/read_helper.c:338:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2020-11-04  2:57 ` [PATCH] netfs: fix bugon.cocci warnings kernel 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.