Commit a395d6a7 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

kernel/...: convert pr_warning to pr_warn

Use the more common logging method with the eventual goal of removing
pr_warning altogether.

Miscellanea:

 - Realign arguments
 - Coalesce formats
 - Add missing space between a few coalesced formats
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>	[kernel/power/suspend.c]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 20d7a35b
...@@ -1322,7 +1322,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ...@@ -1322,7 +1322,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
if (nmsk != omsk) if (nmsk != omsk)
/* hope the handler works with current trigger mode */ /* hope the handler works with current trigger mode */
pr_warning("irq %d uses trigger mode %u; requested %u\n", pr_warn("irq %d uses trigger mode %u; requested %u\n",
irq, nmsk, omsk); irq, nmsk, omsk);
} }
......
...@@ -473,8 +473,7 @@ static int enter_state(suspend_state_t state) ...@@ -473,8 +473,7 @@ static int enter_state(suspend_state_t state)
if (state == PM_SUSPEND_FREEZE) { if (state == PM_SUSPEND_FREEZE) {
#ifdef CONFIG_PM_DEBUG #ifdef CONFIG_PM_DEBUG
if (pm_test_level != TEST_NONE && pm_test_level <= TEST_CPUS) { if (pm_test_level != TEST_NONE && pm_test_level <= TEST_CPUS) {
pr_warning("PM: Unsupported test mode for suspend to idle," pr_warn("PM: Unsupported test mode for suspend to idle, please choose none/freezer/devices/platform.\n");
"please choose none/freezer/devices/platform.\n");
return -EAGAIN; return -EAGAIN;
} }
#endif #endif
......
...@@ -378,7 +378,7 @@ static int __init tick_nohz_full_setup(char *str) ...@@ -378,7 +378,7 @@ static int __init tick_nohz_full_setup(char *str)
{ {
alloc_bootmem_cpumask_var(&tick_nohz_full_mask); alloc_bootmem_cpumask_var(&tick_nohz_full_mask);
if (cpulist_parse(str, tick_nohz_full_mask) < 0) { if (cpulist_parse(str, tick_nohz_full_mask) < 0) {
pr_warning("NOHZ: Incorrect nohz_full cpumask\n"); pr_warn("NO_HZ: Incorrect nohz_full cpumask\n");
free_bootmem_cpumask_var(tick_nohz_full_mask); free_bootmem_cpumask_var(tick_nohz_full_mask);
return 1; return 1;
} }
...@@ -446,8 +446,7 @@ void __init tick_nohz_init(void) ...@@ -446,8 +446,7 @@ void __init tick_nohz_init(void)
* interrupts to avoid circular dependency on the tick * interrupts to avoid circular dependency on the tick
*/ */
if (!arch_irq_work_has_interrupt()) { if (!arch_irq_work_has_interrupt()) {
pr_warning("NO_HZ: Can't run full dynticks because arch doesn't " pr_warn("NO_HZ: Can't run full dynticks because arch doesn't support irq work self-IPIs\n");
"support irq work self-IPIs\n");
cpumask_clear(tick_nohz_full_mask); cpumask_clear(tick_nohz_full_mask);
cpumask_copy(housekeeping_mask, cpu_possible_mask); cpumask_copy(housekeeping_mask, cpu_possible_mask);
tick_nohz_full_running = false; tick_nohz_full_running = false;
...@@ -457,7 +456,8 @@ void __init tick_nohz_init(void) ...@@ -457,7 +456,8 @@ void __init tick_nohz_init(void)
cpu = smp_processor_id(); cpu = smp_processor_id();
if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) { if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) {
pr_warning("NO_HZ: Clearing %d from nohz_full range for timekeeping\n", cpu); pr_warn("NO_HZ: Clearing %d from nohz_full range for timekeeping\n",
cpu);
cpumask_clear_cpu(cpu, tick_nohz_full_mask); cpumask_clear_cpu(cpu, tick_nohz_full_mask);
} }
......
...@@ -1437,12 +1437,12 @@ static struct trace_event trace_blk_event = { ...@@ -1437,12 +1437,12 @@ static struct trace_event trace_blk_event = {
static int __init init_blk_tracer(void) static int __init init_blk_tracer(void)
{ {
if (!register_trace_event(&trace_blk_event)) { if (!register_trace_event(&trace_blk_event)) {
pr_warning("Warning: could not register block events\n"); pr_warn("Warning: could not register block events\n");
return 1; return 1;
} }
if (register_tracer(&blk_tracer) != 0) { if (register_tracer(&blk_tracer) != 0) {
pr_warning("Warning: could not register the block tracer\n"); pr_warn("Warning: could not register the block tracer\n");
unregister_trace_event(&trace_blk_event); unregister_trace_event(&trace_blk_event);
return 1; return 1;
} }
......
...@@ -1058,8 +1058,7 @@ static __init void ftrace_profile_tracefs(struct dentry *d_tracer) ...@@ -1058,8 +1058,7 @@ static __init void ftrace_profile_tracefs(struct dentry *d_tracer)
entry = tracefs_create_file("function_profile_enabled", 0644, entry = tracefs_create_file("function_profile_enabled", 0644,
d_tracer, NULL, &ftrace_profile_fops); d_tracer, NULL, &ftrace_profile_fops);
if (!entry) if (!entry)
pr_warning("Could not create tracefs " pr_warn("Could not create tracefs 'function_profile_enabled' entry\n");
"'function_profile_enabled' entry\n");
} }
#else /* CONFIG_FUNCTION_PROFILER */ #else /* CONFIG_FUNCTION_PROFILER */
...@@ -2314,7 +2313,7 @@ unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec) ...@@ -2314,7 +2313,7 @@ unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec)
if (rec->flags & FTRACE_FL_TRAMP_EN) { if (rec->flags & FTRACE_FL_TRAMP_EN) {
ops = ftrace_find_tramp_ops_curr(rec); ops = ftrace_find_tramp_ops_curr(rec);
if (FTRACE_WARN_ON(!ops)) { if (FTRACE_WARN_ON(!ops)) {
pr_warning("Bad trampoline accounting at: %p (%pS)\n", pr_warn("Bad trampoline accounting at: %p (%pS)\n",
(void *)rec->ip, (void *)rec->ip); (void *)rec->ip, (void *)rec->ip);
/* Ftrace is shutting down, return anything */ /* Ftrace is shutting down, return anything */
return (unsigned long)FTRACE_ADDR; return (unsigned long)FTRACE_ADDR;
......
...@@ -2071,20 +2071,20 @@ void trace_printk_init_buffers(void) ...@@ -2071,20 +2071,20 @@ void trace_printk_init_buffers(void)
/* trace_printk() is for debug use only. Don't use it in production. */ /* trace_printk() is for debug use only. Don't use it in production. */
pr_warning("\n"); pr_warn("\n");
pr_warning("**********************************************************\n"); pr_warn("**********************************************************\n");
pr_warning("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n");
pr_warning("** **\n"); pr_warn("** **\n");
pr_warning("** trace_printk() being used. Allocating extra memory. **\n"); pr_warn("** trace_printk() being used. Allocating extra memory. **\n");
pr_warning("** **\n"); pr_warn("** **\n");
pr_warning("** This means that this is a DEBUG kernel and it is **\n"); pr_warn("** This means that this is a DEBUG kernel and it is **\n");
pr_warning("** unsafe for production use. **\n"); pr_warn("** unsafe for production use. **\n");
pr_warning("** **\n"); pr_warn("** **\n");
pr_warning("** If you see this message and you are not debugging **\n"); pr_warn("** If you see this message and you are not debugging **\n");
pr_warning("** the kernel, report this immediately to your vendor! **\n"); pr_warn("** the kernel, report this immediately to your vendor! **\n");
pr_warning("** **\n"); pr_warn("** **\n");
pr_warning("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n");
pr_warning("**********************************************************\n"); pr_warn("**********************************************************\n");
/* Expand the buffers to set size */ /* Expand the buffers to set size */
tracing_update_buffers(); tracing_update_buffers();
...@@ -4101,7 +4101,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_enum_map **start, ...@@ -4101,7 +4101,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_enum_map **start,
*/ */
map_array = kmalloc(sizeof(*map_array) * (len + 2), GFP_KERNEL); map_array = kmalloc(sizeof(*map_array) * (len + 2), GFP_KERNEL);
if (!map_array) { if (!map_array) {
pr_warning("Unable to allocate trace enum mapping\n"); pr_warn("Unable to allocate trace enum mapping\n");
return; return;
} }
...@@ -6131,7 +6131,7 @@ tracing_init_tracefs_percpu(struct trace_array *tr, long cpu) ...@@ -6131,7 +6131,7 @@ tracing_init_tracefs_percpu(struct trace_array *tr, long cpu)
snprintf(cpu_dir, 30, "cpu%ld", cpu); snprintf(cpu_dir, 30, "cpu%ld", cpu);
d_cpu = tracefs_create_dir(cpu_dir, d_percpu); d_cpu = tracefs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) { if (!d_cpu) {
pr_warning("Could not create tracefs '%s' entry\n", cpu_dir); pr_warn("Could not create tracefs '%s' entry\n", cpu_dir);
return; return;
} }
...@@ -6318,7 +6318,7 @@ struct dentry *trace_create_file(const char *name, ...@@ -6318,7 +6318,7 @@ struct dentry *trace_create_file(const char *name,
ret = tracefs_create_file(name, mode, parent, data, fops); ret = tracefs_create_file(name, mode, parent, data, fops);
if (!ret) if (!ret)
pr_warning("Could not create tracefs '%s' entry\n", name); pr_warn("Could not create tracefs '%s' entry\n", name);
return ret; return ret;
} }
...@@ -6337,7 +6337,7 @@ static struct dentry *trace_options_init_dentry(struct trace_array *tr) ...@@ -6337,7 +6337,7 @@ static struct dentry *trace_options_init_dentry(struct trace_array *tr)
tr->options = tracefs_create_dir("options", d_tracer); tr->options = tracefs_create_dir("options", d_tracer);
if (!tr->options) { if (!tr->options) {
pr_warning("Could not create tracefs directory 'options'\n"); pr_warn("Could not create tracefs directory 'options'\n");
return NULL; return NULL;
} }
...@@ -7248,7 +7248,7 @@ __init static int tracer_alloc_buffers(void) ...@@ -7248,7 +7248,7 @@ __init static int tracer_alloc_buffers(void)
if (trace_boot_clock) { if (trace_boot_clock) {
ret = tracing_set_clock(&global_trace, trace_boot_clock); ret = tracing_set_clock(&global_trace, trace_boot_clock);
if (ret < 0) if (ret < 0)
pr_warning("Trace clock %s not defined, going back to default\n", pr_warn("Trace clock %s not defined, going back to default\n",
trace_boot_clock); trace_boot_clock);
} }
......
...@@ -1350,7 +1350,7 @@ void graph_trace_open(struct trace_iterator *iter) ...@@ -1350,7 +1350,7 @@ void graph_trace_open(struct trace_iterator *iter)
out_err_free: out_err_free:
kfree(data); kfree(data);
out_err: out_err:
pr_warning("function graph tracer: not enough memory\n"); pr_warn("function graph tracer: not enough memory\n");
} }
void graph_trace_close(struct trace_iterator *iter) void graph_trace_close(struct trace_iterator *iter)
...@@ -1468,12 +1468,12 @@ static __init int init_graph_trace(void) ...@@ -1468,12 +1468,12 @@ static __init int init_graph_trace(void)
max_bytes_for_cpu = snprintf(NULL, 0, "%d", nr_cpu_ids - 1); max_bytes_for_cpu = snprintf(NULL, 0, "%d", nr_cpu_ids - 1);
if (!register_trace_event(&graph_trace_entry_event)) { if (!register_trace_event(&graph_trace_entry_event)) {
pr_warning("Warning: could not register graph trace events\n"); pr_warn("Warning: could not register graph trace events\n");
return 1; return 1;
} }
if (!register_trace_event(&graph_trace_ret_event)) { if (!register_trace_event(&graph_trace_ret_event)) {
pr_warning("Warning: could not register graph trace events\n"); pr_warn("Warning: could not register graph trace events\n");
return 1; return 1;
} }
......
...@@ -459,15 +459,13 @@ static int __register_trace_kprobe(struct trace_kprobe *tk) ...@@ -459,15 +459,13 @@ static int __register_trace_kprobe(struct trace_kprobe *tk)
if (ret == 0) if (ret == 0)
tk->tp.flags |= TP_FLAG_REGISTERED; tk->tp.flags |= TP_FLAG_REGISTERED;
else { else {
pr_warning("Could not insert probe at %s+%lu: %d\n", pr_warn("Could not insert probe at %s+%lu: %d\n",
trace_kprobe_symbol(tk), trace_kprobe_offset(tk), ret); trace_kprobe_symbol(tk), trace_kprobe_offset(tk), ret);
if (ret == -ENOENT && trace_kprobe_is_on_module(tk)) { if (ret == -ENOENT && trace_kprobe_is_on_module(tk)) {
pr_warning("This probe might be able to register after" pr_warn("This probe might be able to register after target module is loaded. Continue.\n");
"target module is loaded. Continue.\n");
ret = 0; ret = 0;
} else if (ret == -EILSEQ) { } else if (ret == -EILSEQ) {
pr_warning("Probing address(0x%p) is not an " pr_warn("Probing address(0x%p) is not an instruction boundary.\n",
"instruction boundary.\n",
tk->rp.kp.addr); tk->rp.kp.addr);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -529,7 +527,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk) ...@@ -529,7 +527,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk)
/* Register new event */ /* Register new event */
ret = register_kprobe_event(tk); ret = register_kprobe_event(tk);
if (ret) { if (ret) {
pr_warning("Failed to register probe event(%d)\n", ret); pr_warn("Failed to register probe event(%d)\n", ret);
goto end; goto end;
} }
...@@ -564,8 +562,7 @@ static int trace_kprobe_module_callback(struct notifier_block *nb, ...@@ -564,8 +562,7 @@ static int trace_kprobe_module_callback(struct notifier_block *nb,
__unregister_trace_kprobe(tk); __unregister_trace_kprobe(tk);
ret = __register_trace_kprobe(tk); ret = __register_trace_kprobe(tk);
if (ret) if (ret)
pr_warning("Failed to re-register probe %s on" pr_warn("Failed to re-register probe %s on %s: %d\n",
"%s: %d\n",
trace_event_name(&tk->tp.call), trace_event_name(&tk->tp.call),
mod->name, ret); mod->name, ret);
} }
...@@ -1336,16 +1333,14 @@ static __init int init_kprobe_trace(void) ...@@ -1336,16 +1333,14 @@ static __init int init_kprobe_trace(void)
/* Event list interface */ /* Event list interface */
if (!entry) if (!entry)
pr_warning("Could not create tracefs " pr_warn("Could not create tracefs 'kprobe_events' entry\n");
"'kprobe_events' entry\n");
/* Profile interface */ /* Profile interface */
entry = tracefs_create_file("kprobe_profile", 0444, d_tracer, entry = tracefs_create_file("kprobe_profile", 0444, d_tracer,
NULL, &kprobe_profile_ops); NULL, &kprobe_profile_ops);
if (!entry) if (!entry)
pr_warning("Could not create tracefs " pr_warn("Could not create tracefs 'kprobe_profile' entry\n");
"'kprobe_profile' entry\n");
return 0; return 0;
} }
fs_initcall(init_kprobe_trace); fs_initcall(init_kprobe_trace);
......
...@@ -146,7 +146,7 @@ static ssize_t mmio_read(struct trace_iterator *iter, struct file *filp, ...@@ -146,7 +146,7 @@ static ssize_t mmio_read(struct trace_iterator *iter, struct file *filp,
/* XXX: This is later than where events were lost. */ /* XXX: This is later than where events were lost. */
trace_seq_printf(s, "MARK 0.000000 Lost %lu events.\n", n); trace_seq_printf(s, "MARK 0.000000 Lost %lu events.\n", n);
if (!overrun_detected) if (!overrun_detected)
pr_warning("mmiotrace has lost events.\n"); pr_warn("mmiotrace has lost events\n");
overrun_detected = true; overrun_detected = true;
goto print_out; goto print_out;
} }
......
...@@ -636,8 +636,8 @@ ssize_t traceprobe_probes_write(struct file *file, const char __user *buffer, ...@@ -636,8 +636,8 @@ ssize_t traceprobe_probes_write(struct file *file, const char __user *buffer,
*tmp = '\0'; *tmp = '\0';
size = tmp - kbuf + 1; size = tmp - kbuf + 1;
} else if (done + size < count) { } else if (done + size < count) {
pr_warning("Line length is too long: " pr_warn("Line length is too long: Should be less than %d\n",
"Should be less than %d.", WRITE_BUFSIZE); WRITE_BUFSIZE);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
......
...@@ -281,8 +281,7 @@ static int tracing_stat_init(void) ...@@ -281,8 +281,7 @@ static int tracing_stat_init(void)
stat_dir = tracefs_create_dir("trace_stat", d_tracing); stat_dir = tracefs_create_dir("trace_stat", d_tracing);
if (!stat_dir) if (!stat_dir)
pr_warning("Could not create tracefs " pr_warn("Could not create tracefs 'trace_stat' entry\n");
"'trace_stat' entry\n");
return 0; return 0;
} }
......
...@@ -334,7 +334,7 @@ static int register_trace_uprobe(struct trace_uprobe *tu) ...@@ -334,7 +334,7 @@ static int register_trace_uprobe(struct trace_uprobe *tu)
ret = register_uprobe_event(tu); ret = register_uprobe_event(tu);
if (ret) { if (ret) {
pr_warning("Failed to register probe event(%d)\n", ret); pr_warn("Failed to register probe event(%d)\n", ret);
goto end; goto end;
} }
......
...@@ -491,7 +491,7 @@ static __init int init_tracepoints(void) ...@@ -491,7 +491,7 @@ static __init int init_tracepoints(void)
ret = register_module_notifier(&tracepoint_module_nb); ret = register_module_notifier(&tracepoint_module_nb);
if (ret) if (ret)
pr_warning("Failed to register tracepoint module enter notifier\n"); pr_warn("Failed to register tracepoint module enter notifier\n");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment