linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: erofs: fix Warning Use BUG_ON instead of if condition followed by BUG
@ 2019-05-18 17:33 Hariprasad Kelam
  2019-05-19  8:24 ` Gao Xiang
  2019-05-19  9:35 ` [PATCH v2] " Gao Xiang
  0 siblings, 2 replies; 4+ messages in thread
From: Hariprasad Kelam @ 2019-05-18 17:33 UTC (permalink / raw)


fix below warning reported by  coccicheck

drivers/staging/erofs/unzip_pagevec.h:74:2-5: WARNING: Use BUG_ON
instead of if condition followed by BUG.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam at gmail.com>
---
 drivers/staging/erofs/unzip_pagevec.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
index f37d8fd..0f61c54 100644
--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -70,8 +70,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
 			return tagptr_unfold_ptr(t);
 	}
 
-	if (unlikely(nr >= ctor->nr))
-		BUG();
+	BUG_ON(nr >= ctor->nr);
 
 	return NULL;
 }
-- 
2.7.4

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

end of thread, other threads:[~2019-05-20  2:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-18 17:33 [PATCH] staging: erofs: fix Warning Use BUG_ON instead of if condition followed by BUG Hariprasad Kelam
2019-05-19  8:24 ` Gao Xiang
2019-05-19  9:35 ` [PATCH v2] " Gao Xiang
2019-05-20  2:19   ` Chao Yu

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