mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ppc : Use syslog macro for the printk log level.
@ 2006-12-18 22:02 Robert P. J. Day
  2006-12-18 22:36 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2006-12-18 22:02 UTC (permalink / raw)
  To: Linux kernel mailing list; +Cc: trivial


  Use the appropriate logging macro for the priority level for that
printk call.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  this appears to be the only instance in the entire tree of
hard-coding the log level in a printk.


diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c
index 5475709..041c017 100644
--- a/arch/ppc/syslib/m8260_pci_erratum9.c
+++ b/arch/ppc/syslib/m8260_pci_erratum9.c
@@ -105,7 +105,8 @@ void idma_pci9_init(void)
 	idma_reg[IDMA_CHAN].idmr = 0;		/* mask all IDMA interrupts */
 	idma_reg[IDMA_CHAN].idsr = 0xff;	/* clear all event flags */

-	printk("<4>Using IDMA%d for MPC8260 device erratum PCI 9 workaround\n",
+	printk(	KERN_WARNING
+		"Using IDMA%d for MPC8260 device erratum PCI 9 workaround\n",
 		IDMA_CHAN + 1);

 	return;

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

* Re: [PATCH] ppc : Use syslog macro for the printk log level.
  2006-12-18 22:02 [PATCH] ppc : Use syslog macro for the printk log level Robert P. J. Day
@ 2006-12-18 22:36 ` David Rientjes
  2006-12-21  3:36   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2006-12-18 22:36 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-kernel, trivial

Remove the remaining hard-coded printk levels.

Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
---
 arch/arm/lib/io-acorn.S         |    4 +++-
 arch/arm/vfp/vfphw.S            |    8 +++++---
 arch/arm26/lib/io-acorn.S       |    4 +++-
 drivers/isdn/i4l/isdn_bsdcomp.c |    4 ++--
 drivers/net/bsd_comp.c          |    4 ++--
 5 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/arch/arm/lib/io-acorn.S b/arch/arm/lib/io-acorn.S
index 1b197ea..19656f1 100644
--- a/arch/arm/lib/io-acorn.S
+++ b/arch/arm/lib/io-acorn.S
@@ -13,11 +13,13 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
+#define KERN_WARNING	"<4>"
+
 		.text
 		.align
 
 .Liosl_warning:
-		.ascii	"<4>insl/outsl not implemented, called from %08lX\0"
+		.ascii	KERN_WARNING "insl/outsl not implemented, called from %08lX\0"
 		.align
 
 /*
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index e51e667..0dd4077 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -18,13 +18,15 @@ #include <asm/thread_info.h>
 #include <asm/vfpmacros.h>
 #include "../kernel/entry-header.S"
 
+#define KERN_DEBUG	"<7>"
+
 	.macro	DBGSTR, str
 #ifdef DEBUG
 	stmfd	sp!, {r0-r3, ip, lr}
 	add	r0, pc, #4
 	bl	printk
 	b	1f
-	.asciz  "<7>VFP: \str\n"
+	.asciz  KERN_DEBUG "VFP: \str\n"
 	.balign 4
 1:	ldmfd	sp!, {r0-r3, ip, lr}
 #endif
@@ -37,7 +39,7 @@ #ifdef DEBUG
 	add	r0, pc, #4
 	bl	printk
 	b	1f
-	.asciz  "<7>VFP: \str\n"
+	.asciz  KERN_DEBUG "VFP: \str\n"
 	.balign 4
 1:	ldmfd	sp!, {r0-r3, ip, lr}
 #endif
@@ -52,7 +54,7 @@ #ifdef DEBUG
 	add	r0, pc, #4
 	bl	printk
 	b	1f
-	.asciz  "<7>VFP: \str\n"
+	.asciz  KERN_DEBUG "VFP: \str\n"
 	.balign 4
 1:	ldmfd	sp!, {r0-r3, ip, lr}
 #endif
diff --git a/arch/arm26/lib/io-acorn.S b/arch/arm26/lib/io-acorn.S
index 5f62ade..6547f37 100644
--- a/arch/arm26/lib/io-acorn.S
+++ b/arch/arm26/lib/io-acorn.S
@@ -11,6 +11,8 @@ #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/hardware.h>
 
+#define KERN_WARNING	"<4>"
+
 		.text
 		.align
 
@@ -40,7 +42,7 @@ #include <asm/hardware.h>
 		.endm
 
 .iosl_warning:
-		.ascii	"<4>insl/outsl not implemented, called from %08lX\0"
+		.ascii	KERN_WARNING "insl/outsl not implemented, called from %08lX\0"
 		.align
 
 /*
diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c
index a20f33b..948f514 100644
--- a/drivers/isdn/i4l/isdn_bsdcomp.c
+++ b/drivers/isdn/i4l/isdn_bsdcomp.c
@@ -430,7 +430,7 @@ #ifdef DEBUG
 static unsigned short *lens_ptr(struct bsd_db *db, int idx)
 {
 	if ((unsigned int) idx > (unsigned int) db->maxmaxcode) {
-		printk (KERN_DEBUG "<9>ppp: lens_ptr(%d) > max\n", idx);
+		printk (KERN_DEBUG "ppp: lens_ptr(%d) > max\n", idx);
 		idx = 0;
 	}
 	return lens_ptrx (db, idx);
@@ -439,7 +439,7 @@ static unsigned short *lens_ptr(struct b
 static struct bsd_dict *dict_ptr(struct bsd_db *db, int idx)
 {
 	if ((unsigned int) idx >= (unsigned int) db->hsize) {
-		printk (KERN_DEBUG "<9>ppp: dict_ptr(%d) > max\n", idx);
+		printk (KERN_DEBUG "ppp: dict_ptr(%d) > max\n", idx);
 		idx = 0;
 	}
 	return dict_ptrx (db, idx);
diff --git a/drivers/net/bsd_comp.c b/drivers/net/bsd_comp.c
index 7845eaf..af3f83f 100644
--- a/drivers/net/bsd_comp.c
+++ b/drivers/net/bsd_comp.c
@@ -531,7 +531,7 @@ static unsigned short *lens_ptr(struct b
   {
     if ((unsigned int) idx > (unsigned int) db->maxmaxcode)
       {
-	printk ("<9>ppp: lens_ptr(%d) > max\n", idx);
+	printk (KERN_DEBUG "ppp: lens_ptr(%d) > max\n", idx);
 	idx = 0;
       }
     return lens_ptrx (db, idx);
@@ -541,7 +541,7 @@ static struct bsd_dict *dict_ptr(struct 
   {
     if ((unsigned int) idx >= (unsigned int) db->hsize)
       {
-	printk ("<9>ppp: dict_ptr(%d) > max\n", idx);
+	printk (KERN_DEBUG "ppp: dict_ptr(%d) > max\n", idx);
 	idx = 0;
       }
     return dict_ptrx (db, idx);

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

* Re: [PATCH] ppc : Use syslog macro for the printk log level.
  2006-12-18 22:36 ` David Rientjes
@ 2006-12-21  3:36   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2006-12-21  3:36 UTC (permalink / raw)
  To: David Rientjes; +Cc: Robert P. J. Day, linux-kernel, trivial

On Mon, 18 Dec 2006 14:36:23 -0800 (PST)
David Rientjes <rientjes@cs.washington.edu> wrote:

> --- a/arch/arm/vfp/vfphw.S
> +++ b/arch/arm/vfp/vfphw.S
> @@ -18,13 +18,15 @@ #include <asm/thread_info.h>
>  #include <asm/vfpmacros.h>
>  #include "../kernel/entry-header.S"
>  
> +#define KERN_DEBUG	"<7>"
> +

These definitions should be available to assembly code via inclusion of
kernel.h?

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

end of thread, other threads:[~2006-12-21  3:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-18 22:02 [PATCH] ppc : Use syslog macro for the printk log level Robert P. J. Day
2006-12-18 22:36 ` David Rientjes
2006-12-21  3:36   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®