浏览代码

BUG_ON() Conversion in kernel/signal.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Eric Sesterhenn 19 年之前
父节点
当前提交
9f31252cb6
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      kernel/timer.c

+ 1 - 2
kernel/timer.c

@@ -1479,8 +1479,7 @@ register_time_interpolator(struct time_interpolator *ti)
 	unsigned long flags;
 	unsigned long flags;
 
 
 	/* Sanity check */
 	/* Sanity check */
-	if (ti->frequency == 0 || ti->mask == 0)
-		BUG();
+	BUG_ON(ti->frequency == 0 || ti->mask == 0);
 
 
 	ti->nsec_per_cyc = ((u64)NSEC_PER_SEC << ti->shift) / ti->frequency;
 	ti->nsec_per_cyc = ((u64)NSEC_PER_SEC << ti->shift) / ti->frequency;
 	spin_lock(&time_interpolator_lock);
 	spin_lock(&time_interpolator_lock);