提交 2e1c958d 编写于 作者: J Julia Lawall 提交者: Jonas Bonn

arch/openrisc/mm/init.c: trivial: use BUG_ON

Use BUG_ON(x) rather than if(x) BUG();

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);

@@ identifier x; @@
-if (!x) BUG();
+BUG_ON(!x);
// </smpl>
Signed-off-by: NJulia Lawall <julia@diku.dk>
Signed-off-by: NJonas Bonn <jonas@southpole.se>
上级 3f6ffc8c
......@@ -222,8 +222,7 @@ void __init mem_init(void)
{
int codesize, reservedpages, datasize, initsize;
if (!mem_map)
BUG();
BUG_ON(!mem_map);
set_max_mapnr_init();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册