lkml.org 
[lkml]   [2014]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] kernel/debug/debug_core.c: Logging clean-up
From
Date
On Thu, 2014-06-12 at 20:48 +0200, Fabian Frederick wrote:
> -Convert printk( to pr_foo()
> -Add pr_fmt
> -Coalesce formats

Might as well add missing newlines
and maybe remove unnecessary periods.

> diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
[]
> @@ -196,8 +199,8 @@ int __weak kgdb_validate_break_address(unsigned long addr)
> return err;
> err = kgdb_arch_remove_breakpoint(&tmp);
> if (err)
> - printk(KERN_ERR "KGDB: Critical breakpoint error, kernel "
> - "memory destroyed at: %lx", addr);
> + pr_err("Critical breakpoint error, kernel memory destroyed at: %lx",
> + addr);

Add '\n' newline

[]

> @@ -256,8 +259,8 @@ int dbg_activate_sw_breakpoints(void)
> error = kgdb_arch_set_breakpoint(&kgdb_break[i]);
> if (error) {
> ret = error;
> - printk(KERN_INFO "KGDB: BP install failed: %lx",
> - kgdb_break[i].bpt_addr);
> + pr_info("BP install failed: %lx",
> + kgdb_break[i].bpt_addr);

here too



> @@ -964,8 +966,7 @@ int kgdb_register_io_module(struct kgdb_io *new_dbg_io_ops)
> if (dbg_io_ops) {
> spin_unlock(&kgdb_registration_lock);
>
> - printk(KERN_ERR "kgdb: Another I/O driver is already "
> - "registered with KGDB.\n");
> + pr_err("Another I/O driver is already registered with KGDB.\n");

Maybe remove period

pr_err("Another I/O driver is already registered with KGDB\n");

> @@ -981,8 +982,7 @@ int kgdb_register_io_module(struct kgdb_io *new_dbg_io_ops)
>
> spin_unlock(&kgdb_registration_lock);
>
> - printk(KERN_INFO "kgdb: Registered I/O driver %s.\n",
> - new_dbg_io_ops->name);
> + pr_info("Registered I/O driver %s.\n", new_dbg_io_ops->name);

here too

> @@ -1017,8 +1017,7 @@ void kgdb_unregister_io_module(struct kgdb_io *old_dbg_io_ops)
>
> spin_unlock(&kgdb_registration_lock);
>
> - printk(KERN_INFO
> - "kgdb: Unregistered I/O driver %s, debugger disabled.\n",
> + pr_info("Unregistered I/O driver %s, debugger disabled.\n",
> old_dbg_io_ops->name);

and here




\
 
 \ /
  Last update: 2014-06-12 21:41    [W:0.036 / U:3.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site