All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c
@ 2005-09-30 19:03 Dinolinux
  2005-09-30 19:33 ` Nish Aravamudan
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Dinolinux @ 2005-09-30 19:03 UTC (permalink / raw)
  To: kernel-janitors

printk() should include the appropriate KERN_* constant.

--- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c    2005-09-20
05:00:41.000000000 +0200
+++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c    2005-09-30
22:40:50.000000000 +0200
@@ -23,23 +23,23 @@ static void doublefault_fn(void)
     store_gdt(&gdt_desc);
     gdt = gdt_desc.address;
 
-    printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
+    printk(KERN_ERR"double fault, gdt at %08lx [%d bytes]\n", gdt,
gdt_desc.size);
 
     if (ptr_ok(gdt)) {
         gdt += GDT_ENTRY_TSS << 3;
         tss = *(u16 *)(gdt+2);
         tss += *(u8 *)(gdt+4) << 16;
         tss += *(u8 *)(gdt+7) << 24;
-        printk("double fault, tss at %08lx\n", tss);
+        printk(KERN_ERR"double fault, tss at %08lx\n", tss);
 
         if (ptr_ok(tss)) {
             struct tss_struct *t = (struct tss_struct *)tss;
 
-            printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
+            printk(KERN_ERR"eip = %08lx, esp = %08lx\n", t->eip, t->esp);
 
-            printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
+            printk(KERN_ERR"eax = %08lx, ebx = %08lx, ecx = %08lx, edx
= %08lx\n",
                 t->eax, t->ebx, t->ecx, t->edx);
-            printk("esi = %08lx, edi = %08lx\n",
+            printk(KERN_ERR"esi = %08lx, edi = %08lx\n",
                 t->esi, t->edi);
         }
     }


This is my first patch so please be nice to me ;-)  . I've tried to make
it as good and correct as I could so there shouldn't be _too_ much
errors. Hope this is the right way to do this...

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c
  2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
@ 2005-09-30 19:33 ` Nish Aravamudan
  2005-09-30 21:18 ` [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c [UPDATED] Dinolinux
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Nish Aravamudan @ 2005-09-30 19:33 UTC (permalink / raw)
  To: kernel-janitors

Your patch is line-wrapped. Also, you need to include a Signed-off-by
line. Please see Documentation/SubmittingPatches.

Thanks,
Nish

On 9/30/05, Dinolinux <slackfan@users.sourceforge.net> wrote:
> printk() should include the appropriate KERN_* constant.
>
> --- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c    2005-09-20
> 05:00:41.000000000 +0200
> +++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c    2005-09-30
> 22:40:50.000000000 +0200
> @@ -23,23 +23,23 @@ static void doublefault_fn(void)
>      store_gdt(&gdt_desc);
>      gdt = gdt_desc.address;
>
> -    printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
> +    printk(KERN_ERR"double fault, gdt at %08lx [%d bytes]\n", gdt,
> gdt_desc.size);
>
>      if (ptr_ok(gdt)) {
>          gdt += GDT_ENTRY_TSS << 3;
>          tss = *(u16 *)(gdt+2);
>          tss += *(u8 *)(gdt+4) << 16;
>          tss += *(u8 *)(gdt+7) << 24;
> -        printk("double fault, tss at %08lx\n", tss);
> +        printk(KERN_ERR"double fault, tss at %08lx\n", tss);
>
>          if (ptr_ok(tss)) {
>              struct tss_struct *t = (struct tss_struct *)tss;
>
> -            printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
> +            printk(KERN_ERR"eip = %08lx, esp = %08lx\n", t->eip, t->esp);
>
> -            printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
> +            printk(KERN_ERR"eax = %08lx, ebx = %08lx, ecx = %08lx, edx
> = %08lx\n",
>                  t->eax, t->ebx, t->ecx, t->edx);
> -            printk("esi = %08lx, edi = %08lx\n",
> +            printk(KERN_ERR"esi = %08lx, edi = %08lx\n",
>                  t->esi, t->edi);
>          }
>      }
>
>
> This is my first patch so please be nice to me ;-)  . I've tried to make
> it as good and correct as I could so there shouldn't be _too_ much
> errors. Hope this is the right way to do this...
>
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors
>

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c [UPDATED]
  2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
  2005-09-30 19:33 ` Nish Aravamudan
@ 2005-09-30 21:18 ` Dinolinux
  2005-09-30 21:32 ` Nishanth Aravamudan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dinolinux @ 2005-09-30 21:18 UTC (permalink / raw)
  To: kernel-janitors

--- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c    2005-09-20
05:00:41.000000000 +0200
+++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c    2005-10-01
00:02:07.000000000 +0200
@@ -23,23 +23,23 @@ static void doublefault_fn(void)
     store_gdt(&gdt_desc);
     gdt = gdt_desc.address;
 
-    printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
+    printk(KERN_ERR "double fault, gdt at %08lx [%d bytes]\n", gdt,
gdt_desc.size);
 
     if (ptr_ok(gdt)) {
         gdt += GDT_ENTRY_TSS << 3;
         tss = *(u16 *)(gdt+2);
         tss += *(u8 *)(gdt+4) << 16;
         tss += *(u8 *)(gdt+7) << 24;
-        printk("double fault, tss at %08lx\n", tss);
+        printk(KERN_ERR "double fault, tss at %08lx\n", tss);
 
         if (ptr_ok(tss)) {
             struct tss_struct *t = (struct tss_struct *)tss;
 
-            printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
+            printk(KERN_ERR "eip = %08lx, esp = %08lx\n", t->eip, t->esp);
 
-            printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
+            printk(KERN_ERR "eax = %08lx, ebx = %08lx, ecx = %08lx, edx
= %08lx\n",
                 t->eax, t->ebx, t->ecx, t->edx);
-            printk("esi = %08lx, edi = %08lx\n",
+            printk(KERN_ERR "esi = %08lx, edi = %08lx\n",
                 t->esi, t->edi);
         }
     }

Fixed the missing spaces.

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c [UPDATED]
  2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
  2005-09-30 19:33 ` Nish Aravamudan
  2005-09-30 21:18 ` [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c [UPDATED] Dinolinux
@ 2005-09-30 21:32 ` Nishanth Aravamudan
  2005-10-01  8:35 ` [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Tobias Klauser
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Nishanth Aravamudan @ 2005-09-30 21:32 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

Still no Signed-off-by and line-wrapped.

Thanks,
Nish

On 01.10.2005 [00:04:47 +0200], Dinolinux wrote:
> --- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c    2005-09-20
> 05:00:41.000000000 +0200
> +++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c    2005-10-01
> 00:02:07.000000000 +0200
> @@ -23,23 +23,23 @@ static void doublefault_fn(void)
>      store_gdt(&gdt_desc);
>      gdt = gdt_desc.address;
>  
> -    printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
> +    printk(KERN_ERR "double fault, gdt at %08lx [%d bytes]\n", gdt,
> gdt_desc.size);
>  
>      if (ptr_ok(gdt)) {
>          gdt += GDT_ENTRY_TSS << 3;
>          tss = *(u16 *)(gdt+2);
>          tss += *(u8 *)(gdt+4) << 16;
>          tss += *(u8 *)(gdt+7) << 24;
> -        printk("double fault, tss at %08lx\n", tss);
> +        printk(KERN_ERR "double fault, tss at %08lx\n", tss);
>  
>          if (ptr_ok(tss)) {
>              struct tss_struct *t = (struct tss_struct *)tss;
>  
> -            printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
> +            printk(KERN_ERR "eip = %08lx, esp = %08lx\n", t->eip, t->esp);
>  
> -            printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
> +            printk(KERN_ERR "eax = %08lx, ebx = %08lx, ecx = %08lx, edx
> = %08lx\n",
>                  t->eax, t->ebx, t->ecx, t->edx);
> -            printk("esi = %08lx, edi = %08lx\n",
> +            printk(KERN_ERR "esi = %08lx, edi = %08lx\n",
>                  t->esi, t->edi);
>          }
>      }
> 
> Fixed the missing spaces.
> 
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors
> 

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c
  2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
                   ` (2 preceding siblings ...)
  2005-09-30 21:32 ` Nishanth Aravamudan
@ 2005-10-01  8:35 ` Tobias Klauser
  2005-10-01 16:00 ` Powerflash
  2005-10-02  9:45 ` Tobias Klauser
  5 siblings, 0 replies; 7+ messages in thread
From: Tobias Klauser @ 2005-10-01  8:35 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

Besides the points Nish alreaqdy brought up:

On 2005-09-30 at 22:56:49 +0200, Dinolinux <slackfan@users.sourceforge.net> wrote:
> printk() should include the appropriate KERN_* constant.

But not always KERN_ERR. See include/linux/kernel.h for all KERN_*
constants. Also it is better to write:
	printk(KERN_ERR "Some error message");
instead of
	printk(KERN_ERR"Some error message");
as you did.

Cheers, Tobias

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c
  2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
                   ` (3 preceding siblings ...)
  2005-10-01  8:35 ` [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Tobias Klauser
@ 2005-10-01 16:00 ` Powerflash
  2005-10-02  9:45 ` Tobias Klauser
  5 siblings, 0 replies; 7+ messages in thread
From: Powerflash @ 2005-10-01 16:00 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

printk() should include the appropriate KERN_* constant.

Signed off by: Anton Brondz (anton.slack@tele2.no)

*--- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c	2005-09-20 05:00:41.000000000 +0200*
*+++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c	2005-10-01 00:02:07.000000000 +0200*
@@ -23,23 +23,23 @@ static void doublefault_fn(void)
 	store_gdt(&gdt_desc);
 	gdt = gdt_desc.address;
 
-	printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
+	printk(KERN_ERR "double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
 
 	if (ptr_ok(gdt)) {
 		gdt += GDT_ENTRY_TSS << 3;
 		tss = *(u16 *)(gdt+2);
 		tss += *(u8 *)(gdt+4) << 16;
 		tss += *(u8 *)(gdt+7) << 24;
-		printk("double fault, tss at %08lx\n", tss);
+		printk(KERN_ERR "double fault, tss at %08lx\n", tss);
 
 		if (ptr_ok(tss)) {
 			struct tss_struct *t = (struct tss_struct *)tss;
 
-			printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
+			printk(KERN_ERR "eip = %08lx, esp = %08lx\n", t->eip, t->esp);
 
-			printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
+			printk(KERN_ERR "eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
 				t->eax, t->ebx, t->ecx, t->edx);
-			printk("esi = %08lx, edi = %08lx\n",
+			printk(KERN_ERR "esi = %08lx, edi = %08lx\n",
 				t->esi, t->edi);
 		}
 	}


Hope this is working now. I've tried to fix the word wrap. My usual
email address isn't working today, so I'm sending from this one. Just in
case, I'm sending the patch as an attacment too.

[-- Attachment #2: doublefault.patch --]
[-- Type: text/plain, Size: 1198 bytes --]

--- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c	2005-09-20 05:00:41.000000000 +0200
+++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c	2005-10-01 00:02:07.000000000 +0200
@@ -23,23 +23,23 @@ static void doublefault_fn(void)
 	store_gdt(&gdt_desc);
 	gdt = gdt_desc.address;
 
-	printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
+	printk(KERN_ERR "double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
 
 	if (ptr_ok(gdt)) {
 		gdt += GDT_ENTRY_TSS << 3;
 		tss = *(u16 *)(gdt+2);
 		tss += *(u8 *)(gdt+4) << 16;
 		tss += *(u8 *)(gdt+7) << 24;
-		printk("double fault, tss at %08lx\n", tss);
+		printk(KERN_ERR "double fault, tss at %08lx\n", tss);
 
 		if (ptr_ok(tss)) {
 			struct tss_struct *t = (struct tss_struct *)tss;
 
-			printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
+			printk(KERN_ERR "eip = %08lx, esp = %08lx\n", t->eip, t->esp);
 
-			printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
+			printk(KERN_ERR "eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
 				t->eax, t->ebx, t->ecx, t->edx);
-			printk("esi = %08lx, edi = %08lx\n",
+			printk(KERN_ERR "esi = %08lx, edi = %08lx\n",
 				t->esi, t->edi);
 		}
 	}

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c
  2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
                   ` (4 preceding siblings ...)
  2005-10-01 16:00 ` Powerflash
@ 2005-10-02  9:45 ` Tobias Klauser
  5 siblings, 0 replies; 7+ messages in thread
From: Tobias Klauser @ 2005-10-02  9:45 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]

On 2005-10-01 at 19:54:40 +0200, Powerflash <contact@powerflash.atspace.org> wrote:
> printk() should include the appropriate KERN_* constant.
> 
> Signed off by: Anton Brondz (anton.slack@tele2.no)
> 
> *--- linux-2.6.14-rc2.orig/arch/i386/kernel/doublefault.c	2005-09-20 05:00:41.000000000 +0200*
> *+++ linux-2.6.14-rc2/arch/i386/kernel/doublefault.c	2005-10-01 00:02:07.000000000 +0200*
  ^
  Huh? It doesn't seem to appear in the attached patch file.

> @@ -23,23 +23,23 @@ static void doublefault_fn(void)
>  	store_gdt(&gdt_desc);
>  	gdt = gdt_desc.address;
>  
> -	printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
> +	printk(KERN_ERR "double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);

I don't think KERN_ERR is appropriate here. Again, see
include/linux/kernel.h for all KERN_* constants and pay attention to the
comments. Or see the many patches Christophe already sent for this TODO
entry.

>  	if (ptr_ok(gdt)) {
>  		gdt += GDT_ENTRY_TSS << 3;
>  		tss = *(u16 *)(gdt+2);
>  		tss += *(u8 *)(gdt+4) << 16;
>  		tss += *(u8 *)(gdt+7) << 24;
> -		printk("double fault, tss at %08lx\n", tss);
> +		printk(KERN_ERR "double fault, tss at %08lx\n", tss);

Ditto

>  		if (ptr_ok(tss)) {
>  			struct tss_struct *t = (struct tss_struct *)tss;
>  
> -			printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
> +			printk(KERN_ERR "eip = %08lx, esp = %08lx\n", t->eip, t->esp);

Ditto

> -			printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
> +			printk(KERN_ERR "eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",

Ditto

>  				t->eax, t->ebx, t->ecx, t->edx);
> -			printk("esi = %08lx, edi = %08lx\n",
> +			printk(KERN_ERR "esi = %08lx, edi = %08lx\n",

Ditto

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-10-02  9:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-30 19:03 [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Dinolinux
2005-09-30 19:33 ` Nish Aravamudan
2005-09-30 21:18 ` [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c [UPDATED] Dinolinux
2005-09-30 21:32 ` Nishanth Aravamudan
2005-10-01  8:35 ` [KJ] [PATCH] printk: arch/i386/kernel/doublefault.c Tobias Klauser
2005-10-01 16:00 ` Powerflash
2005-10-02  9:45 ` Tobias Klauser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.