Skip to contentSkip to conversation

printk : arch/alpha/kernel/core_lca.c

PATCH RESEND New Christophe Lucas 1 participant 2 messages Sep 14, 2005 – Sep 27, 2005

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

PATCH RESEND 1/1 printk : arch/alpha/kernel/core_lca.c

Quoted 13 lines · Alexey Dobriyan

arch/alpha/kernel/core_lca.c lca_init_arch(void) · line 337

Quoted 10 lines · Christophe Lucas

printk() calls should include appropriate KERN_* constant.

arch/alpha/kernel/core_lca.c +1 -1
@@ -334,23 +334,23 @@ lca_init_arch(void)
 static void
 mem_error(unsigned long esr, unsigned long ear)
 {
-	printk("    %s %s error to %s occurred at address %x\n",
+	printk(KERN_WARNING "    %s %s error to %s occurred at address %x\n",

Looks like these should be printed with KERN_ERR.

Ok,

I resend it.

arch/alpha/kernel/core_lca.c +13 -13
Index: linux-2.6.13/arch/alpha/kernel/core_lca.c
===================================================================
@@ -334,23 +334,23 @@ lca_init_arch(void)
 static void
 mem_error(unsigned long esr, unsigned long ear)
 {
-	printk("    %s %s error to %s occurred at address %x\n",
+	printk(KERN_ERR "    %s %s error to %s occurred at address %x\n",
 	       ((esr & ESR_CEE) ? "Correctable" :
 		(esr & ESR_UEE) ? "Uncorrectable" : "A"),
 	       (esr & ESR_WRE) ? "write" : "read",
 	       (esr & ESR_SOR) ? "memory" : "b-cache",
 	       (unsigned) (ear & 0x1ffffff8));
 	if (esr & ESR_CTE) {
-		printk("    A b-cache tag parity error was detected.\n");
+		printk(KERN_ERR "    A b-cache tag parity error was detected.\n");
 	}
 	if (esr & ESR_MSE) {
-		printk("    Several other correctable errors occurred.\n");
+		printk(KERN_ERR "    Several other correctable errors occurred.\n");
 	}
 	if (esr & ESR_MHE) {
-		printk("    Several other uncorrectable errors occurred.\n");
+		printk(KERN_ERR "    Several other uncorrectable errors occurred.\n");
 	}
 	if (esr & ESR_NXM) {
-		printk("    Attempted to access non-existent memory.\n");
+		printk(KERN_ERR "    Attempted to access non-existent memory.\n");
 	}
 }
 
@@ -372,16 +372,16 @@ ioc_error(__u32 stat0, __u32 stat1)
 	unsigned code = (stat0 & IOC_CODE) >> IOC_CODE_SHIFT;
 	unsigned cmd  = (stat0 & IOC_CMD)  >> IOC_CMD_SHIFT;
 
-	printk("    %s initiated PCI %s cycle to address %x"
+	printk(KERN_ERR "    %s initiated PCI %s cycle to address %x"
 	       " failed due to %s.\n",
 	       code > 3 ? "PCI" : "CPU", pci_cmd[cmd], stat1, err_name[code]);
 
 	if (code == 5 || code == 6) {
-		printk("    (Error occurred at PCI memory address %x.)\n",
+		printk(KERN_ERR "    (Error occurred at PCI memory address %x.)\n",
 		       (stat0 & ~IOC_P_NBR));
 	}
 	if (stat0 & IOC_LOST) {
-		printk("    Other PCI errors occurred simultaneously.\n");
+		printk(KERN_ERR "    Other PCI errors occurred simultaneously.\n");
 	}
 }
 
@@ -482,12 +482,12 @@ lca_clock_print(void)
 
         pmr_reg = LCA_READ_PMR;
 
-        printk("Status of clock control:\n");
-        printk("\tPrimary clock divisor\t0x%lx\n", LCA_GET_PRIMARY(pmr_reg));
-        printk("\tOverride clock divisor\t0x%lx\n", LCA_GET_OVERRIDE(pmr_reg));
-        printk("\tInterrupt override is %s\n",
+        printk(KERN_INFO "Status of clock control:\n");
+        printk(KERN_INFO "\tPrimary clock divisor\t0x%lx\n", LCA_GET_PRIMARY(pmr_reg));
+        printk(KERN_INFO "\tOverride clock divisor\t0x%lx\n", LCA_GET_OVERRIDE(pmr_reg));
+        printk(KERN_INFO "\tInterrupt override is %s\n",
 	       (pmr_reg & LCA_PMR_INTO) ? "on" : "off"); 
-        printk("\tDMA override is %s\n",
+        printk(KERN_INFO "\tDMA override is %s\n",
 	       (pmr_reg & LCA_PMR_DMAO) ? "on" : "off"); 
 
 }

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

#1 lore raw

PATCH RESEND 1/1 printk : arch/alpha/kernel/osf_sys.c

Description:
printk() calls should include appropriate KERN_* constant.

arch/alpha/kernel/osf_sys.c +4 -4
Index: linux-2.6.14-rc2/arch/alpha/kernel/osf_sys.c
===================================================================
@@ -78,7 +78,7 @@ osf_set_program_attributes(unsigned long
 	mm->end_code = bss_start + bss_len;
 	mm->brk = bss_start + bss_len;
 #if 0
-	printk("set_program_attributes(%lx %lx %lx %lx)\n",
+	printk(KERN_DEBUG "set_program_attributes(%lx %lx %lx %lx)\n",
 		text_start, text_len, bss_start, bss_len);
 #endif
 	unlock_kernel();
@@ -182,7 +182,7 @@ osf_mmap(unsigned long addr, unsigned lo
 
 #if 0
 	if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
-		printk("%s: unimplemented OSF mmap flags %04lx\n", 
+		printk(KERN_DEBUG "%s: unimplemented OSF mmap flags %04lx\n", 
 			current->comm, flags);
 #endif
 	if (!(flags & MAP_ANONYMOUS)) {
@@ -387,7 +387,7 @@ osf_mount(unsigned long typenr, char __u
 		retval = osf_procfs_mount(name, data, flag);
 		break;
 	default:
-		printk("osf_mount(%ld, %x)\n", typenr, flag);
+		printk(KERN_INFO "osf_mount(%ld, %x)\n", typenr, flag);
 	}
 	putname(name);
  out:
@@ -625,7 +625,7 @@ osf_sysinfo(int command, char __user *bu
 	offset = command-1;
 	if (offset >= sizeof(sysinfo_table)/sizeof(char *)) {
 		/* Digital UNIX has a few unpublished interfaces here */
-		printk("sysinfo(%d)", command);
+		printk(KERN_ERR "sysinfo(%d)", command);
 		goto out;
 	}
 	

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