All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] um: Replace if (cond) BUG() with BUG_ON()
@ 2021-08-28  1:11 ` CGEL
  0 siblings, 0 replies; 2+ messages in thread
From: CGEL @ 2021-08-28  1:11 UTC (permalink / raw)
  To: Jeff Dike
  Cc: Richard Weinberger, Anton Ivanov, Andrew Morton,
	David Hildenbrand, Yang Li, Christophe Leroy, Dave Hansen,
	Kefeng Wang, linux-um, linux-kernel, Changcheng Deng, Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

Fix the following coccinelle reports:

./arch/um/kernel/mem.c:89:2-5: WARNING: Use BUG_ON instead of if
condition followed by BUG.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 arch/um/kernel/mem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 8e636ce..1810e69 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -85,8 +85,7 @@ static void __init one_md_table_init(pud_t *pud)
 		      __func__, PAGE_SIZE, PAGE_SIZE);
 
 	set_pud(pud, __pud(_KERNPG_TABLE + (unsigned long) __pa(pmd_table)));
-	if (pmd_table != pmd_offset(pud, 0))
-		BUG();
+	BUG_ON(pmd_table != pmd_offset(pud, 0));
 #endif
 }
 
-- 
1.8.3.1



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

* [PATCH linux-next] um: Replace if (cond) BUG() with BUG_ON()
@ 2021-08-28  1:11 ` CGEL
  0 siblings, 0 replies; 2+ messages in thread
From: CGEL @ 2021-08-28  1:11 UTC (permalink / raw)
  To: Jeff Dike
  Cc: Richard Weinberger, Anton Ivanov, Andrew Morton,
	David Hildenbrand, Yang Li, Christophe Leroy, Dave Hansen,
	Kefeng Wang, linux-um, linux-kernel, Changcheng Deng, Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

Fix the following coccinelle reports:

./arch/um/kernel/mem.c:89:2-5: WARNING: Use BUG_ON instead of if
condition followed by BUG.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 arch/um/kernel/mem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 8e636ce..1810e69 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -85,8 +85,7 @@ static void __init one_md_table_init(pud_t *pud)
 		      __func__, PAGE_SIZE, PAGE_SIZE);
 
 	set_pud(pud, __pud(_KERNPG_TABLE + (unsigned long) __pa(pmd_table)));
-	if (pmd_table != pmd_offset(pud, 0))
-		BUG();
+	BUG_ON(pmd_table != pmd_offset(pud, 0));
 #endif
 }
 
-- 
1.8.3.1



_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


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

end of thread, other threads:[~2021-08-28  1:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  1:11 [PATCH linux-next] um: Replace if (cond) BUG() with BUG_ON() CGEL
2021-08-28  1:11 ` CGEL

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.