* [atishp04:uefi_riscv_5.9_v3 16/22] arch/riscv/mm/init.c:258:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG.
@ 2020-07-17 14:43 kernel test robot
2020-07-17 14:43 ` [PATCH] RISC-V: fix bugon.cocci warnings kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-07-17 14:43 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Atish Patra <atish.patra@wdc.com>
tree: https://github.com/atishp04/linux uefi_riscv_5.9_v3
head: 6704b94c1a532f3c8d8fcdb9db87313a87350ec8
commit: 4f1b8699833b26397b5667e74d8bce5f12c487eb [16/22] RISC-V: Implement late mapping page table allocation functions
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: riscv-randconfig-c022-20200717 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> arch/riscv/mm/init.c:258:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32244 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] RISC-V: fix bugon.cocci warnings
2020-07-17 14:43 [atishp04:uefi_riscv_5.9_v3 16/22] arch/riscv/mm/init.c:258:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
@ 2020-07-17 14:43 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-17 14:43 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Atish Patra <atish.patra@wdc.com>
CC: Paul Walmsley <paul.walmsley@sifive.com>
CC: Palmer Dabbelt <palmer@dabbelt.com>
CC: Albert Ou <aou@eecs.berkeley.edu>
CC: Anup Patel <anup.patel@wdc.com>
CC: Zong Li <zong.li@sifive.com>
CC: Mike Rapoport <rppt@linux.ibm.com>
CC: Kefeng Wang <wangkefeng.wang@huawei.com>
CC: Yash Shah <yash.shah@sifive.com>
CC: linux-riscv(a)lists.infradead.org
From: kernel test robot <lkp@intel.com>
arch/riscv/mm/init.c:258:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)
Use BUG_ON instead of a if condition followed by BUG.
Semantic patch information:
This makes an effort to find cases where BUG() follows an if
condition on an expression and replaces the if condition and BUG()
with a BUG_ON having the conditional expression of the if statement
as argument.
Generated by: scripts/coccinelle/misc/bugon.cocci
Fixes: 4f1b8699833b ("RISC-V: Implement late mapping page table allocation functions")
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/atishp04/linux uefi_riscv_5.9_v3
head: 6704b94c1a532f3c8d8fcdb9db87313a87350ec8
commit: 4f1b8699833b26397b5667e74d8bce5f12c487eb [16/22] RISC-V: Implement late mapping page table allocation functions
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
Please take the patch only if it's a positive warning. Thanks!
init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -254,8 +254,7 @@ static phys_addr_t __init alloc_pte(uint
BUG_ON(!mmu_enabled);
if (late_mapping) {
vaddr = __get_free_page(GFP_KERNEL);
- if (!vaddr || !pgtable_pte_page_ctor(virt_to_page(vaddr)))
- BUG();
+ BUG_ON(!vaddr || !pgtable_pte_page_ctor(virt_to_page(vaddr)));
return __pa(vaddr);
} else
return memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-17 14:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 14:43 [atishp04:uefi_riscv_5.9_v3 16/22] arch/riscv/mm/init.c:258:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG kernel test robot
2020-07-17 14:43 ` [PATCH] RISC-V: fix bugon.cocci warnings kernel test robot
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.