Skip to contentSkip to conversation

printk : arch/arm/kernel/setup.c

PATCH New Christophe Lucas 1 participant 1 message Jan 10, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk : arch/arm/kernel/setup.c

Description:
printk should include appropriate KERN_* constant (of course only at beginning of lines).

arch/arm/kernel/setup.c +8 -6
Index: linux-2.6.15/arch/arm/kernel/setup.c
===================================================================
@@ -231,7 +231,8 @@
 {
 	unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
 
-	printk("CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d sets\n",
+	printk(KERN_DEBUG 
+		"CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d sets\n",
 		cpu, prefix,
 		mult << (8 + CACHE_SIZE(cache)),
 		(mult << CACHE_ASSOC(cache)) >> 1,
@@ -245,7 +246,8 @@
 	unsigned int info = read_cpuid(CPUID_CACHETYPE);
 
 	if (info != processor_id) {
-		printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
+		printk(KERN_DEBUG 
+			"CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
 		       cache_types[CACHE_TYPE(info)]);
 		if (CACHE_S(info)) {
 			dump_cache("I cache", cpu, CACHE_ISIZE(info));
@@ -291,7 +293,7 @@
 	 */
 	list = lookup_processor_type();
 	if (!list) {
-		printk("CPU configuration botched (ID %08x), unable "
+		printk(KERN_CRIT "CPU configuration botched (ID %08x), unable "
 		       "to continue.\n", processor_id);
 		while (1);
 	}
@@ -311,7 +313,7 @@
 	cpu_cache = *list->cache;
 #endif
 
-	printk("CPU: %s [%08x] revision %d (ARMv%s)\n",
+	printk(KERN_INFO "CPU: %s [%08x] revision %d (ARMv%s)\n",
 	       cpu_name, processor_id, (int)processor_id & 15,
 	       proc_arch[cpu_architecture()]);
 
@@ -373,12 +375,12 @@
 	 */
 	list = lookup_machine_type(nr);
 	if (!list) {
-		printk("Machine configuration botched (nr %d), unable "
+		printk(KERN_CRIT "Machine configuration botched (nr %d), unable "
 		       "to continue.\n", nr);
 		while (1);
 	}
 
-	printk("Machine: %s\n", list->name);
+	printk(KERN_INFO "Machine: %s\n", list->name);
 
 	return list;
 }

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors