Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bde78a79 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Ingo Molnar
Browse files

x86: use WARN() in arch/x86/kernel



Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
This also allowed the folding of some if()'s into the WARN()

Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Cc: akpm@linux-foundation.org
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 0c072bb4
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1496,11 +1496,8 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn)

	/* kvm/qemu doesn't have mtrr set right, don't trim them all */
	if (!highest_pfn) {
		if (!kvm_para_available()) {
			printk(KERN_WARNING
		WARN(!kvm_para_available(), KERN_WARNING
				"WARNING: strange, CPU MTRRs all blank?\n");
			WARN_ON(1);
		}
		return 0;
	}

+1 −2
Original line number Diff line number Diff line
@@ -343,9 +343,8 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
	/* were we called with bad_dma_address? */
	badend = bad_dma_address + (EMERGENCY_PAGES * PAGE_SIZE);
	if (unlikely((dma_addr >= bad_dma_address) && (dma_addr < badend))) {
		printk(KERN_ERR "Calgary: driver tried unmapping bad DMA "
		WARN(1, KERN_ERR "Calgary: driver tried unmapping bad DMA "
		       "address 0x%Lx\n", dma_addr);
		WARN_ON(1);
		return;
	}

+2 −4
Original line number Diff line number Diff line
@@ -88,11 +88,9 @@ static __cpuinit void check_tsc_warp(void)
			__raw_spin_unlock(&sync_lock);
		}
	}
	if (!(now-start)) {
		printk("Warning: zero tsc calibration delta: %Ld [max: %Ld]\n",
	WARN(!(now-start),
		"Warning: zero tsc calibration delta: %Ld [max: %Ld]\n",
			now-start, end-start);
		WARN_ON(1);
	}
}

/*