Commit 184b8f7f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'printk-for-5.5-pr-warning-removal' of...

Merge tag 'printk-for-5.5-pr-warning-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk

Pull pr_warning() removal from Petr Mladek.

 - Final removal of the unused pr_warning() alias.

You're supposed to use just "pr_warn()" in the kernel.

* tag 'printk-for-5.5-pr-warning-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
  checkpatch: Drop pr_warning check
  printk: Drop pr_warning definition
  Fix up for "printk: Drop pr_warning definition"
  workqueue: Use pr_warn instead of pr_warning
parents 316eaf17 969bea5e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -302,9 +302,8 @@ extern int kptr_restrict;
	printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
#define pr_err(fmt, ...) \
	printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
#define pr_warning(fmt, ...) \
#define pr_warn(fmt, ...) \
	printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
#define pr_warn pr_warning
#define pr_notice(fmt, ...) \
	printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
#define pr_info(fmt, ...) \
+1 −1
Original line number Diff line number Diff line
@@ -5070,7 +5070,7 @@ static __init int test_ringbuffer(void)
	int ret = 0;

	if (security_locked_down(LOCKDOWN_TRACEFS)) {
		pr_warning("Lockdown is enabled, skipping ring buffer tests\n");
		pr_warn("Lockdown is enabled, skipping ring buffer tests\n");
		return 0;
	}

+3 −3
Original line number Diff line number Diff line
@@ -1889,7 +1889,7 @@ int __init register_tracer(struct tracer *type)
	}

	if (security_locked_down(LOCKDOWN_TRACEFS)) {
		pr_warning("Can not register tracer %s due to lockdown\n",
		pr_warn("Can not register tracer %s due to lockdown\n",
			   type->name);
		return -EPERM;
	}
@@ -8796,7 +8796,7 @@ struct dentry *tracing_init_dentry(void)
	struct trace_array *tr = &global_trace;

	if (security_locked_down(LOCKDOWN_TRACEFS)) {
		pr_warning("Tracing disabled due to lockdown\n");
		pr_warn("Tracing disabled due to lockdown\n");
		return ERR_PTR(-EPERM);
	}

@@ -9244,7 +9244,7 @@ __init static int tracer_alloc_buffers(void)


	if (security_locked_down(LOCKDOWN_TRACEFS)) {
		pr_warning("Tracing disabled due to lockdown\n");
		pr_warn("Tracing disabled due to lockdown\n");
		return -EPERM;
	}

+2 −2
Original line number Diff line number Diff line
@@ -4374,7 +4374,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
	for_each_pwq(pwq, wq) {
		spin_lock_irq(&pwq->pool->lock);
		if (WARN_ON(pwq_busy(pwq))) {
			pr_warning("%s: %s has the following busy pwq\n",
			pr_warn("%s: %s has the following busy pwq\n",
				__func__, wq->name);
			show_pwq(pwq);
			spin_unlock_irq(&pwq->pool->lock);
+0 −9
Original line number Diff line number Diff line
@@ -4125,15 +4125,6 @@ sub process {
			     "Prefer [subsystem eg: netdev]_$level2([subsystem]dev, ... then dev_$level2(dev, ... then pr_$level(...  to printk(KERN_$orig ...\n" . $herecurr);
		}

		if ($line =~ /\bpr_warning\s*\(/) {
			if (WARN("PREFER_PR_LEVEL",
				 "Prefer pr_warn(... to pr_warning(...\n" . $herecurr) &&
			    $fix) {
				$fixed[$fixlinenr] =~
				    s/\bpr_warning\b/pr_warn/;
			}
		}

		if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
			my $orig = $1;
			my $level = lc($orig);