Skip to contentSkip to conversation

printk : arch/ia64/kernel/smp.c

PATCH In review [email protected] 3 participants 5 messages Mar 19, 2005 – Jun 20, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk : arch/ia64/kernel/smp.c

printk() calls should include appropriate KERN_* constant.

---

 kj-domen/arch/ia64/kernel/smp.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kernel/smp.c renamed from arch/ia64/kernel/smp.c~printk-arch_ia64_kernel_smp +1 -1
diff -puN arch/ia64/kernel/smp.c~printk-arch_ia64_kernel_smp arch/ia64/kernel/smp.c
@@ -269,7 +269,7 @@ smp_call_function_single (int cpuid, voi
 	int me = get_cpu(); /* prevent preemption and reschedule on another processor */
 
 	if (cpuid = me) {
-		printk("%s: trying to call self\n", __FUNCTION__);
+		printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
 		put_cpu();
 		return -EBUSY;
 	}

_

#1 lore raw
Quoted 6 lines
	if (cpuid = me) {
arch/ia64/kernel/smp.c renamed from arch/ia64/kernel/smp.c~printk-arch_ia64_kernel_smp +1 -1
-		printk("%s: trying to call self\n", __FUNCTION__);
+		printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
		put_cpu();
		return -EBUSY;
	}

I think this is a bit higher priority than KERN_INFO. If we get here, then someone did something wrong at a higher level, and they may be disapponited that the function they want called isn't going to be called.

Perhaps KERN_WARNING would be more appropriate?

It might also be kind to anyone trying to debug this to print the "func" argument.

-Tony

#2 lore raw
In reply to [email protected]
Quoted 12 lines · Tony
Quoted 6 lines
	if (cpuid == me) {
(quoted diff) +1 -1
-		printk("%s: trying to call self\n", __FUNCTION__);
+		printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
		put_cpu();
		return -EBUSY;
	}

I think this is a bit higher priority than KERN_INFO. If we get here, then someone did something wrong at a higher level, and they may be disapponited that the function they want called isn't going to be called.

Quoted 7 lines

Perhaps KERN_WARNING would be more appropriate?

It might also be kind to anyone trying to debug this to print the "func" argument.

-Tony

Perhaps this could do the job:

arch/ia64/kernel/smp.c +1 -1
diff -uprN -X dontdiff a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
@@ -269,7 +269,7 @@ smp_call_function_single (int cpuid, voi
 	int me = get_cpu(); /* prevent preemption and reschedule on another processor */
 
 	if (cpuid == me) {
-		printk("%s: trying to call self\n", __FUNCTION__);
+		printk(KERN_WARNING "%s: trying to call self with info:%08x\n", __FUNCTION__, info);
 		put_cpu();
 		return -EBUSY;
 	}
#3 lore raw
In reply to [email protected]

arch/ia64/kernel/smp.c smp_call_function_single (int cpuid, voi

Quoted 3 lines · Christophe Lucas
arch/ia64/kernel/smp.c renamed from arch/ia64/kernel/smp.c~printk-arch_ia64_kernel_smp +1 -1
 	if (cpuid = me) {
-		printk("%s: trying to call self\n", __FUNCTION__);
+		printk(KERN_WARNING "%s: trying to call self with info:%08x\n", __FUNCTION__, info);

Hmm... %p is supposed to be used for pointers, right?

Domen

#4 lore raw

PATCH 1/1 printk : arch/ia64/kernel/smp.c

In reply to [email protected]

From: Christophe Lucas <[email protected]>

printk() calls should include appropriate KERN_* constant.

---
 smp.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: quilt/arch/ia64/kernel/smp.c
=================================--- quilt.orig/arch/ia64/kernel/smp.c
+++ quilt/arch/ia64/kernel/smp.c
@@ -269,7 +269,7 @@ smp_call_function_single (int cpuid, voi
int me = get_cpu(); /* prevent preemption and reschedule on another processor */

if (cpuid = me) {
- printk("%s: trying to call self\n", __FUNCTION__);
+ printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
put_cpu();
return -EBUSY;
}

--