summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-03-17 08:11:36 +0100
committerRichard Weinberger <richard@nod.at>2021-04-15 23:10:37 +0200
commit24271ffed750bc84ea8f73bbab30c59d53f56171 (patch)
tree324980ec289667993771159cbe5ff7ee831caef9
parentum: Disable CONFIG_GCOV with MODULES (diff)
downloadlinux-24271ffed750bc84ea8f73bbab30c59d53f56171.tar.xz
linux-24271ffed750bc84ea8f73bbab30c59d53f56171.zip
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@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/kernel/mem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 9242dc91d751..22e28bfb22cc 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));
}
}