Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -17
+1 -2
include/linux/printk.h
··· 302 302 printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) 303 303 #define pr_err(fmt, ...) \ 304 304 printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) 305 - #define pr_warning(fmt, ...) \ 305 + #define pr_warn(fmt, ...) \ 306 306 printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) 307 - #define pr_warn pr_warning 308 307 #define pr_notice(fmt, ...) \ 309 308 printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) 310 309 #define pr_info(fmt, ...) \
+1 -1
kernel/trace/ring_buffer.c
··· 5070 5070 int ret = 0; 5071 5071 5072 5072 if (security_locked_down(LOCKDOWN_TRACEFS)) { 5073 - pr_warning("Lockdown is enabled, skipping ring buffer tests\n"); 5073 + pr_warn("Lockdown is enabled, skipping ring buffer tests\n"); 5074 5074 return 0; 5075 5075 } 5076 5076
+3 -3
kernel/trace/trace.c
··· 1889 1889 } 1890 1890 1891 1891 if (security_locked_down(LOCKDOWN_TRACEFS)) { 1892 - pr_warning("Can not register tracer %s due to lockdown\n", 1892 + pr_warn("Can not register tracer %s due to lockdown\n", 1893 1893 type->name); 1894 1894 return -EPERM; 1895 1895 } ··· 8796 8796 struct trace_array *tr = &global_trace; 8797 8797 8798 8798 if (security_locked_down(LOCKDOWN_TRACEFS)) { 8799 - pr_warning("Tracing disabled due to lockdown\n"); 8799 + pr_warn("Tracing disabled due to lockdown\n"); 8800 8800 return ERR_PTR(-EPERM); 8801 8801 } 8802 8802 ··· 9244 9244 9245 9245 9246 9246 if (security_locked_down(LOCKDOWN_TRACEFS)) { 9247 - pr_warning("Tracing disabled due to lockdown\n"); 9247 + pr_warn("Tracing disabled due to lockdown\n"); 9248 9248 return -EPERM; 9249 9249 } 9250 9250
+2 -2
kernel/workqueue.c
··· 4374 4374 for_each_pwq(pwq, wq) { 4375 4375 spin_lock_irq(&pwq->pool->lock); 4376 4376 if (WARN_ON(pwq_busy(pwq))) { 4377 - pr_warning("%s: %s has the following busy pwq\n", 4378 - __func__, wq->name); 4377 + pr_warn("%s: %s has the following busy pwq\n", 4378 + __func__, wq->name); 4379 4379 show_pwq(pwq); 4380 4380 spin_unlock_irq(&pwq->pool->lock); 4381 4381 mutex_unlock(&wq->mutex);
-9
scripts/checkpatch.pl
··· 4125 4125 "Prefer [subsystem eg: netdev]_$level2([subsystem]dev, ... then dev_$level2(dev, ... then pr_$level(... to printk(KERN_$orig ...\n" . $herecurr); 4126 4126 } 4127 4127 4128 - if ($line =~ /\bpr_warning\s*\(/) { 4129 - if (WARN("PREFER_PR_LEVEL", 4130 - "Prefer pr_warn(... to pr_warning(...\n" . $herecurr) && 4131 - $fix) { 4132 - $fixed[$fixlinenr] =~ 4133 - s/\bpr_warning\b/pr_warn/; 4134 - } 4135 - } 4136 - 4137 4128 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) { 4138 4129 my $orig = $1; 4139 4130 my $level = lc($orig);