[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236661850-8237-17-git-send-email-stoyboyker@gmail.com>
Date: Tue, 10 Mar 2009 00:10:41 -0500
From: Stoyan Gaydarov <stoyboyker@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Stoyan Gaydarov <stoyboyker@...il.com>, takata@...ux-m32r.org,
linux-m32r@...linux-m32r.org
Subject: [PATCH 16/25] [m32r] BUG to BUG_ON changes
Signed-off-by: Stoyan Gaydarov <stoyboyker@...il.com>
---
arch/m32r/kernel/setup.c | 3 +--
arch/m32r/kernel/smp.c | 9 +++------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
index 0392112..6e119ee 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -402,8 +402,7 @@ void __init cpu_init (void)
/* Set up and load the per-CPU TSS and LDT */
atomic_inc(&init_mm.mm_count);
current->active_mm = &init_mm;
- if (current->mm)
- BUG();
+ BUG_ON(current->mm);
/* Force FPU initialization */
current_thread_info()->status = 0;
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index 929e5c9..17c96bb 100644
--- a/arch/m32r/kernel/smp.c
+++ b/arch/m32r/kernel/smp.c
@@ -338,8 +338,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
cpu_clear(cpu_id, cpu_mask);
#ifdef DEBUG_SMP
- if (!mm)
- BUG();
+ BUG_ON(!mm);
#endif
if (*mmc != NO_CONTEXT) {
@@ -385,8 +384,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
#ifdef DEBUG_SMP
unsigned long flags;
__save_flags(flags);
- if (!(flags & 0x0040)) /* Interrupt Disable NONONO */
- BUG();
+ BUG_ON(!(flags & 0x0040)); /* Interrupt Disable NONONO */
#endif /* DEBUG_SMP */
/*
@@ -805,8 +803,7 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num,
if (mask & ~physids_coerce(phys_cpu_present_map))
BUG();
- if (ipi_num >= NR_IPIS)
- BUG();
+ BUG_ON(ipi_num >= NR_IPIS);
mask <<= IPI_SHIFT;
ipilock = &ipi_lock[ipi_num];
--
1.6.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists