[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1615965096-122733-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Wed, 17 Mar 2021 15:11:36 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: jdike@...toit.com
Cc: richard@....at, anton.ivanov@...bridgegreys.com,
linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] um: replace if (cond) BUG() with BUG_ON()
Fix the following coccinelle reports:
./arch/um/kernel/mem.c:77:3-6: WARNING: Use BUG_ON instead of if
condition followed by BUG.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
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 9242dc9..22e28bf 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -73,8 +73,7 @@ static void __init one_page_table_init(pmd_t *pmd)
set_pmd(pmd, __pmd(_KERNPG_TABLE +
(unsigned long) __pa(pte)));
- if (pte != pte_offset_kernel(pmd, 0))
- BUG();
+ BUG_ON(pte != pte_offset_kernel(pmd, 0));
}
}
--
1.8.3.1
Powered by blists - more mailing lists