Re: [PATCH 1/1] kernel/debug/debug_core.c: Logging clean-up
From: Joe Perches
Date: Thu Jun 12 2014 - 15:04:13 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/