Skip to content

Commit

Permalink
arch/tile/mm/init.c: trivial: use BUG_ON
Browse files Browse the repository at this point in the history
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: Julia Lawall <[email protected]>
Signed-off-by: Chris Metcalf <[email protected]>
  • Loading branch information
Julia Lawall authored and cmetcalf-tilera committed Aug 2, 2011
1 parent 3d071cd commit d1afa65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/tile/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,7 @@ void __init mem_init(void)
#endif

#ifdef CONFIG_FLATMEM
if (!mem_map)
BUG();
BUG_ON(!mem_map);
#endif

#ifdef CONFIG_HIGHMEM
Expand Down

0 comments on commit d1afa65

Please sign in to comment.