diff options
author | Changcheng Deng <deng.changcheng@zte.com.cn> | 2021-08-27 18:11:08 -0700 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2021-12-21 21:18:39 +0100 |
commit | 8bd18ef9eaac2e812b42da9eb19b2d59293aa25b (patch) | |
tree | 354c6e252a0745635932ebce32e2b8e794850253 /arch/um/kernel | |
parent | 494545aa9b50a1dcaafcb235e2cb40b246c65169 (diff) | |
download | linux-8bd18ef9eaac2e812b42da9eb19b2d59293aa25b.tar.bz2 |
um: Replace if (cond) BUG() with BUG_ON()
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>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/mem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 0039771eb01c..15295c3237a0 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 } |