All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] include KERN_* constant in printk() calls in mm/slab.c
@ 2007-04-09 19:41 Matthias Kaehlcke
  2007-04-09 20:02 ` [KJ] [PATCH] include KERN_* constant in printk() calls in Dave Jones
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Matthias Kaehlcke @ 2007-04-09 19:41 UTC (permalink / raw)
  To: kernel-janitors

hi,

this is my first janitorial. please let me know your suggestions if
you notice something incorrect or improvable.

the patch is against v2.6.21-rc6

---

include KERN_* constant in printk() calls in mm/slab.c

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>

---

diff --git a/mm/slab.c b/mm/slab.c
index 4cbac24..616c240 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1732,9 +1732,9 @@ static void dump_line(char *data, int offset, int limit)
 			error = data[offset + i];
 			bad_count++;
 		}
-		printk(" %02x", (unsigned char)data[offset + i]);
+		printk(KERN_ERR " %02x", (unsigned char)data[offset + i]);
 	}
-	printk("\n");
+	printk(KERN_ERR "\n");
 
 	if (bad_count = 1) {
 		error ^= POISON_FREE;
@@ -1770,7 +1770,7 @@ static void print_objinfo(struct kmem_cache *cachep, void *objp, int lines)
 			*dbg_userword(cachep, objp));
 		print_symbol("(%s)",
 				(unsigned long)*dbg_userword(cachep, objp));
-		printk("\n");
+		printk(KERN_ERR "\n");
 	}
 	realobj = (char *)objp + obj_offset(cachep);
 	size = obj_size(cachep);
@@ -2151,13 +2151,13 @@ kmem_cache_create (const char *name, size_t size, size_t align,
 		 */
 		res = probe_kernel_address(pc->name, tmp);
 		if (res) {
-			printk("SLAB: cache with size %d has lost its name\n",
+			printk(KERN_WARNING "SLAB: cache with size %d has lost its name\n",
 			       pc->buffer_size);
 			continue;
 		}
 
 		if (!strcmp(pc->name, name)) {
-			printk("kmem_cache_create: duplicate cache %s\n", name);
+			printk(KERN_WARNING "kmem_cache_create: duplicate cache %s\n", name);
 			dump_stack();
 			goto oops;
 		}
@@ -2294,7 +2294,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
 	left_over = calculate_slab_order(cachep, size, align, flags);
 
 	if (!cachep->num) {
-		printk("kmem_cache_create: couldn't create cache %s.\n", name);
+		printk(KERN_WARNING "kmem_cache_create: couldn't create cache %s.\n", name);
 		kmem_cache_free(&cache_cache, cachep);
 		cachep = NULL;
 		goto oops;
@@ -2929,10 +2929,10 @@ bad:
 		     i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
 		     i++) {
 			if (i % 16 = 0)
-				printk("\n%03x:", i);
-			printk(" %02x", ((unsigned char *)slabp)[i]);
+				printk(KERN_ERR "\n%03x:", i);
+			printk(KERN_ERR " %02x", ((unsigned char *)slabp)[i]);
 		}
-		printk("\n");
+		printk(KERN_ERR "\n");
 		BUG();
 	}
 }


-- 
Matthias Kaehlcke
Linux Application Developer
Barcelona

      El trabajo es el refugio de los que no tienen nada que hacer
                            (Oscar Wilde)
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2007-04-14  6:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-09 19:41 [KJ] [PATCH] include KERN_* constant in printk() calls in mm/slab.c Matthias Kaehlcke
2007-04-09 20:02 ` [KJ] [PATCH] include KERN_* constant in printk() calls in Dave Jones
2007-04-09 20:08 ` Matthias Kaehlcke
2007-04-09 20:53 ` Matthias Kaehlcke
2007-04-09 21:23 ` Matthew Wilcox
2007-04-09 21:41 ` Matthew Wilcox
2007-04-10  6:48 ` Matthias Kaehlcke
2007-04-10 21:07 ` Alexey Dobriyan
2007-04-10 21:37 ` Dave Jones
2007-04-10 21:50 ` Robert P. J. Day
2007-04-10 21:58 ` Randy Dunlap
2007-04-11  6:50 ` Matthias Kaehlcke
2007-04-14  5:50   ` [PATCH] include KERN_* constant in printk() calls in arch/i386/mach-default/setup.c Matthias Kaehlcke

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.