Skip to contentSkip to conversation

Kill pr_warning in the whole linux code

PATCH Applied Kefeng Wang 10 participants 48 messages Oct 18, 2019 – Oct 21, 2019

Subsystems (38)
x86 SCSI Sound Block layer +34 more subsystems
lore
Share & tools
lore
#0 lore raw

v2 cover Kill pr_warning in the whole linux code

There are pr_warning and pr_warng to show WARNING level message, most of the code using pr_warn, number based on next-20191017,

pr_warn: 5206 pr_warning: 546 (tools: 399, others: 147)

Joe Perches posted a patch, commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), which is beginning to remove pr_warning, so all logging messages use a consistent pr_warn style once pr_warning removed, and checkpatch also sugguests that better to use pr_warn instead of pr_warning.

Let's carry on with the work to standardize the logging macro, kill pr_warning in the whole linux code.

Note, for tools api/bpf/perf part, rename pr_warning to pr_warn to keep the consistence, with this patchset,

pr_warn: 5747 pr_warning: 0

Patch[01-28]: simply sed and ajust formats
patch[29]: drop pr_warning definition in printk
patch[30-32]: tools api/bpf/perf, rename and make manually changes
patch[33]: cleanup the checkpatch.pl

Miscellanea:
o Coalesce formats
o Realign arguments
o Remove unnecessary line continuations

The patchset is based on next-20191017 and will be taked via printk.git by Petr Mladek, see
https://lore.kernel.org/lkml/[email protected]/

v2:
- Collect ack-by/review-by
- Fix some indentation and alignment
- Split patches in drivers/platform/x86/ suggested by Andy Shevchenko
- Drop staging changes which already merged

Kefeng Wang (33):
alpha: Use pr_warn instead of pr_warning
arm64: Use pr_warn instead of pr_warning
ia64: Use pr_warn instead of pr_warning
riscv: Use pr_warn instead of pr_warning
sh: Use pr_warn instead of pr_warning
sparc: Use pr_warn instead of pr_warning
x86: Use pr_warn instead of pr_warning
acpi: Use pr_warn instead of pr_warning
drbd: Use pr_warn instead of pr_warning
gdrom: Use pr_warn instead of pr_warning
clocksource: samsung_pwm_timer: Use pr_warn instead of pr_warning
crypto: n2: Use pr_warn instead of pr_warning
ide: Use pr_warn instead of pr_warning
idsn: Use pr_warn instead of pr_warning
macintosh: Use pr_warn instead of pr_warning
of: Use pr_warn instead of pr_warning
oprofile: Use pr_warn instead of pr_warning platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning platform/x86: asus-laptop: Use pr_warn instead of pr_warning platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
scsi: Use pr_warn instead of pr_warning
sh/intc: Use pr_warn instead of pr_warning
fs: afs: Use pr_warn instead of pr_warning
vgacon: Use pr_warn instead of pr_warning
dma-debug: Use pr_warn instead of pr_warning
trace: Use pr_warn instead of pr_warning
lib: cpu_rmap: Use pr_warn instead of pr_warning
ASoC: samsung: Use pr_warn instead of pr_warning
printk: Drop pr_warning
tools lib api: Renaming pr_warning to pr_warn
tools lib bpf: Renaming pr_warning to pr_warn
tools perf: Renaming pr_warning to pr_warn
checkpatch: Drop pr_warning check

 arch/alpha/kernel/perf_event.c            |   4 +-
 arch/arm64/kernel/hw_breakpoint.c         |   8 +-
 arch/arm64/kernel/smp.c                   |  11 +-
 arch/ia64/kernel/setup.c                  |   2 +-
 arch/riscv/kernel/module.c                |   4 +-
 arch/sh/boards/mach-sdk7786/nmi.c         |   2 +-
 arch/sh/drivers/pci/fixups-sdk7786.c      |   2 +-
 arch/sh/kernel/io_trapped.c               |   2 +-
 arch/sh/kernel/setup.c                    |   2 +-
 arch/sh/mm/consistent.c                   |   5 +-
 arch/sparc/kernel/smp_64.c                |   6 +-
 arch/x86/kernel/amd_gart_64.c             |  12 +-
 arch/x86/kernel/apic/apic.c               |  41 +-
 arch/x86/kernel/setup_percpu.c            |   4 +-
 arch/x86/kernel/tboot.c                   |  15 +-
 arch/x86/kernel/tsc_sync.c                |   8 +-
 arch/x86/kernel/umip.c                    |   6 +-
 arch/x86/mm/kmmio.c                       |   7 +-
 arch/x86/mm/mmio-mod.c                    |   6 +-
 arch/x86/mm/numa_emulation.c              |   4 +-
 arch/x86/mm/testmmiotrace.c               |   6 +-
 arch/x86/oprofile/op_x86_model.h          |   6 +-
 arch/x86/platform/olpc/olpc-xo15-sci.c    |   2 +-
 arch/x86/platform/sfi/sfi.c               |   3 +-
 arch/x86/xen/setup.c                      |   2 +-
 drivers/acpi/apei/apei-base.c             |  36 +-
 drivers/acpi/apei/einj.c                  |   4 +-
 drivers/acpi/apei/erst-dbg.c              |   5 +-
 drivers/acpi/apei/ghes.c                  |  25 +-
 drivers/acpi/apei/hest.c                  |  14 +-
 drivers/acpi/battery.c                    |   2 +-
 drivers/acpi/resource.c                   |   4 +-
 drivers/block/drbd/drbd_nl.c              |  13 +-
 drivers/cdrom/gdrom.c                     |   4 +-
 drivers/clocksource/samsung_pwm_timer.c   |   2 +-
 drivers/crypto/n2_core.c                  |  12 +-
 drivers/ide/tx4938ide.c                   |   2 +-
 drivers/ide/tx4939ide.c                   |   6 +-
 drivers/isdn/hardware/mISDN/avmfritz.c    |  16 +-
 drivers/isdn/hardware/mISDN/hfcmulti.c    |   8 +-
 drivers/isdn/hardware/mISDN/hfcpci.c      |   3 +-
 drivers/isdn/hardware/mISDN/hfcsusb.c     |   4 +-
 drivers/isdn/hardware/mISDN/mISDNipac.c   |   4 +-
 drivers/isdn/hardware/mISDN/mISDNisar.c   |  10 +-
 drivers/isdn/hardware/mISDN/netjet.c      |   8 +-
 drivers/isdn/hardware/mISDN/w6692.c       |  12 +-
 drivers/isdn/mISDN/hwchannel.c            |   7 +-
 drivers/macintosh/windfarm_fcu_controls.c |   4 +-
 drivers/macintosh/windfarm_lm87_sensor.c  |   4 +-
 drivers/macintosh/windfarm_pm72.c         |  22 +-
 drivers/macintosh/windfarm_rm31.c         |   6 +-
 drivers/of/fdt.c                          |  20 +-
 drivers/oprofile/oprofile_perf.c          |   8 +-
 drivers/platform/x86/asus-laptop.c        |   2 +-
 drivers/platform/x86/eeepc-laptop.c       |   2 +-
 drivers/platform/x86/intel_oaktrail.c     |  10 +-
 drivers/scsi/a3000.c                      |   2 +-
 drivers/sh/intc/core.c                    |   4 +-
 drivers/video/console/vgacon.c            |   6 +-
 fs/afs/flock.c                            |   4 +-
 fs/afs/inode.c                            |  13 +-
 fs/afs/yfsclient.c                        |   4 +-
 include/linux/printk.h                    |   3 +-
 kernel/dma/debug.c                        |   2 +-
 kernel/trace/trace_benchmark.c            |   4 +-
 lib/cpu_rmap.c                            |   2 +-
 scripts/checkpatch.pl                     |   9 -
 sound/soc/samsung/s3c-i2s-v2.c            |   6 +-
 tools/lib/api/debug-internal.h            |   4 +-
 tools/lib/api/debug.c                     |   4 +-
 tools/lib/api/fs/fs.c                     |   4 +-
 tools/lib/bpf/btf.c                       |  56 +-
 tools/lib/bpf/btf_dump.c                  |  18 +-
 tools/lib/bpf/libbpf.c                    | 679 +++++++++++-----------
 tools/lib/bpf/libbpf_internal.h           |   8 +-
 tools/lib/bpf/xsk.c                       |   4 +-
 tools/perf/arch/x86/util/intel-pt.c       |   2 +-
 tools/perf/builtin-annotate.c             |   7 +-
 tools/perf/builtin-buildid-cache.c        |  28 +-
 tools/perf/builtin-diff.c                 |  12 +-
 tools/perf/builtin-help.c                 |  10 +-
 tools/perf/builtin-inject.c               |   8 +-
 tools/perf/builtin-probe.c                |  14 +-
 tools/perf/builtin-record.c               |  10 +-
 tools/perf/builtin-report.c               |   2 +-
 tools/perf/builtin-script.c               |  14 +-
 tools/perf/builtin-stat.c                 |  18 +-
 tools/perf/builtin-timechart.c            |  12 +-
 tools/perf/builtin-top.c                  |   2 +-
 tools/perf/builtin-trace.c                |   8 +-
 tools/perf/lib/internal.h                 |   2 +-
 tools/perf/ui/browsers/scripts.c          |   2 +-
 tools/perf/util/bpf-loader.c              |   6 +-
 tools/perf/util/bpf-prologue.c            |   4 +-
 tools/perf/util/callchain.c               |   2 +-
 tools/perf/util/config.c                  |   8 +-
 tools/perf/util/data-convert-bt.c         |   4 +-
 tools/perf/util/data.c                    |   2 +-
 tools/perf/util/debug.c                   |   4 +-
 tools/perf/util/debug.h                   |   2 +-
 tools/perf/util/event.c                   |   4 +-
 tools/perf/util/evlist.c                  |   4 +-
 tools/perf/util/evsel.c                   |  19 +-
 tools/perf/util/header.c                  |  20 +-
 tools/perf/util/jitdump.c                 |   4 +-
 tools/perf/util/llvm-utils.c              |  18 +-
 tools/perf/util/machine.c                 |   2 +-
 tools/perf/util/parse-branch-options.c    |   3 +-
 tools/perf/util/perf-hooks.c              |   6 +-
 tools/perf/util/probe-event.c             |  90 +--
 tools/perf/util/probe-file.c              |  36 +-
 tools/perf/util/probe-finder.c            | 115 ++--
 tools/perf/util/record.c                  |  18 +-
 tools/perf/util/session.c                 |   2 +-
 tools/perf/util/srcline.c                 |   6 +-
 tools/perf/util/synthetic-events.c        |  10 +-
 tools/perf/util/thread-stack.c            |   4 +-
 tools/perf/util/thread_map.c              |   2 +-
 tools/perf/util/trace-event-parse.c       |   2 +-
 tools/perf/util/unwind-libunwind-local.c  |   9 +-
 120 files changed, 898 insertions(+), 944 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/33 alpha: Use pr_warn instead of pr_warning

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 arch/alpha/kernel/perf_event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/alpha/kernel/perf_event.c +2 -2
index 4341ccf5c0c4..e7a59d927d78 100644
@@ -824,7 +824,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
 	if (unlikely(la_ptr >= alpha_pmu->num_pmcs)) {
 		/* This should never occur! */
 		irq_err_count++;
-		pr_warning("PMI: silly index %ld\n", la_ptr);
+		pr_warn("PMI: silly index %ld\n", la_ptr);
 		wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask);
 		return;
 	}
@@ -847,7 +847,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
 	if (unlikely(!event)) {
 		/* This should never occur! */
 		irq_err_count++;
-		pr_warning("PMI: No event at index %d!\n", idx);
+		pr_warn("PMI: No event at index %d!\n", idx);
 		wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask);
 		return;
 	}
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 2/33 arm64: Use pr_warn instead of pr_warning

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 arch/arm64/kernel/hw_breakpoint.c |  8 ++++----
 arch/arm64/kernel/smp.c           | 11 +++++------
 2 files changed, 9 insertions(+), 10 deletions(-)
arch/arm64/kernel/hw_breakpoint.c +4 -4
index 38ee1514cd9c..0b727edf4104 100644
@@ -51,7 +51,7 @@ int hw_breakpoint_slots(int type)
 	case TYPE_DATA:
 		return get_num_wrps();
 	default:
-		pr_warning("unknown slot type: %d\n", type);
+		pr_warn("unknown slot type: %d\n", type);
 		return 0;
 	}
 }
@@ -112,7 +112,7 @@ static u64 read_wb_reg(int reg, int n)
 	GEN_READ_WB_REG_CASES(AARCH64_DBG_REG_WVR, AARCH64_DBG_REG_NAME_WVR, val);
 	GEN_READ_WB_REG_CASES(AARCH64_DBG_REG_WCR, AARCH64_DBG_REG_NAME_WCR, val);
 	default:
-		pr_warning("attempt to read from unknown breakpoint register %d\n", n);
+		pr_warn("attempt to read from unknown breakpoint register %d\n", n);
 	}
 
 	return val;
@@ -127,7 +127,7 @@ static void write_wb_reg(int reg, int n, u64 val)
 	GEN_WRITE_WB_REG_CASES(AARCH64_DBG_REG_WVR, AARCH64_DBG_REG_NAME_WVR, val);
 	GEN_WRITE_WB_REG_CASES(AARCH64_DBG_REG_WCR, AARCH64_DBG_REG_NAME_WCR, val);
 	default:
-		pr_warning("attempt to write to unknown breakpoint register %d\n", n);
+		pr_warn("attempt to write to unknown breakpoint register %d\n", n);
 	}
 	isb();
 }
@@ -145,7 +145,7 @@ static enum dbg_active_el debug_exception_level(int privilege)
 	case AARCH64_BREAKPOINT_EL1:
 		return DBG_ACTIVE_EL1;
 	default:
-		pr_warning("invalid breakpoint privilege level %d\n", privilege);
+		pr_warn("invalid breakpoint privilege level %d\n", privilege);
 		return -EINVAL;
 	}
 }
arch/arm64/kernel/smp.c +5 -6
index dc9fe879c279..ab149bcc3dc7 100644
@@ -345,8 +345,7 @@ void __cpu_die(unsigned int cpu)
 	 */
 	err = op_cpu_kill(cpu);
 	if (err)
-		pr_warn("CPU%d may not have shut down cleanly: %d\n",
-			cpu, err);
+		pr_warn("CPU%d may not have shut down cleanly: %d\n", cpu, err);
 }
 
 /*
@@ -976,8 +975,8 @@ void smp_send_stop(void)
 		udelay(1);
 
 	if (num_online_cpus() > 1)
-		pr_warning("SMP: failed to stop secondary CPUs %*pbl\n",
-			   cpumask_pr_args(cpu_online_mask));
+		pr_warn("SMP: failed to stop secondary CPUs %*pbl\n",
+			cpumask_pr_args(cpu_online_mask));
 
 	sdei_mask_local_cpu();
 }
@@ -1017,8 +1016,8 @@ void crash_smp_send_stop(void)
 		udelay(1);
 
 	if (atomic_read(&waiting_for_crash_ipi) > 0)
-		pr_warning("SMP: failed to stop secondary CPUs %*pbl\n",
-			   cpumask_pr_args(&mask));
+		pr_warn("SMP: failed to stop secondary CPUs %*pbl\n",
+			cpumask_pr_args(&mask));
 
 	sdei_mask_local_cpu();
 }
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 3/33 ia64: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 arch/ia64/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kernel/setup.c +1 -1
index bb320c6d0cc9..c49fcef754de 100644
@@ -289,7 +289,7 @@ static void __init setup_crashkernel(unsigned long total, int *n)
 		}
 
 		if (!check_crashkernel_memory(base, size)) {
-			pr_warning("crashkernel: There would be kdump memory "
+			pr_warn("crashkernel: There would be kdump memory "
 				"at %ld GB but this is unusable because it "
 				"must\nbe below 4 GB. Change the memory "
 				"configuration of the machine.\n",
Signature · 1 line
2.20.1
reviewer Acked-by on v2 3/33
#4 lore raw

RE: [PATCH v2 03/33] ia64: Use pr_warn instead of pr_warning

Quoted 3 lines

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

#5 lore raw

PATCH v2 4/33 riscv: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 arch/riscv/kernel/module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kernel/module.c +2 -2
index 70bb94ae61c5..b7401858d872 100644
@@ -315,8 +315,8 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
 			/* Ignore unresolved weak symbol */
 			if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
 				continue;
-			pr_warning("%s: Unknown symbol %s\n",
-				   me->name, strtab + sym->st_name);
+			pr_warn("%s: Unknown symbol %s\n",
+				me->name, strtab + sym->st_name);
 			return -ENOENT;
 		}
 
Signature · 1 line
2.20.1
#6 lore raw

PATCH v2 5/33 sh: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Stephen Rothwell <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sh/boards/mach-sdk7786/nmi.c    | 2 +-
 arch/sh/drivers/pci/fixups-sdk7786.c | 2 +-
 arch/sh/kernel/io_trapped.c          | 2 +-
 arch/sh/kernel/setup.c               | 2 +-
 arch/sh/mm/consistent.c              | 5 ++---
 5 files changed, 6 insertions(+), 7 deletions(-)
arch/sh/boards/mach-sdk7786/nmi.c +1 -1
index c2e09d798537..afba49679a12 100644
@@ -37,7 +37,7 @@ static int __init nmi_mode_setup(char *str)
 		nmi_mode = NMI_MODE_ANY;
 	else {
 		nmi_mode = NMI_MODE_UNKNOWN;
-		pr_warning("Unknown NMI mode %s\n", str);
+		pr_warn("Unknown NMI mode %s\n", str);
 	}
 
 	printk("Set NMI mode to %d\n", nmi_mode);
arch/sh/drivers/pci/fixups-sdk7786.c +1 -1
index 8cbfa5310a4b..6972af7b4e93 100644
@@ -53,7 +53,7 @@ static int __init sdk7786_pci_init(void)
 
 		/* Warn about forced rerouting if slot#3 is occupied */
 		if ((data & PCIECR_PRST3) == 0) {
-			pr_warning("Unreachable card detected in slot#3\n");
+			pr_warn("Unreachable card detected in slot#3\n");
 			return -EBUSY;
 		}
 	} else
arch/sh/kernel/io_trapped.c +1 -1
index bacad6da4fe4..60c828a2b8a2 100644
@@ -99,7 +99,7 @@ int register_trapped_io(struct trapped_io *tiop)
 
 	return 0;
  bad:
-	pr_warning("unable to install trapped io filter\n");
+	pr_warn("unable to install trapped io filter\n");
 	return -1;
 }
 EXPORT_SYMBOL_GPL(register_trapped_io);
arch/sh/kernel/setup.c +1 -1
index 914174a125a4..d232cfa01877 100644
@@ -355,7 +355,7 @@ void __init setup_arch(char **cmdline_p)
 /* processor boot mode configuration */
 int generic_mode_pins(void)
 {
-	pr_warning("generic_mode_pins(): missing mode pin configuration\n");
+	pr_warn("generic_mode_pins(): missing mode pin configuration\n");
 	return 0;
 }
 
arch/sh/mm/consistent.c +2 -3
index 792f36129062..3169a343a5ab 100644
@@ -43,8 +43,7 @@ int __init platform_resource_setup_memory(struct platform_device *pdev,
 
 	r = pdev->resource + pdev->num_resources - 1;
 	if (r->flags) {
-		pr_warning("%s: unable to find empty space for resource\n",
-			name);
+		pr_warn("%s: unable to find empty space for resource\n", name);
 		return -EINVAL;
 	}
 
@@ -54,7 +53,7 @@ int __init platform_resource_setup_memory(struct platform_device *pdev,
 
 	buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL);
 	if (!buf) {
-		pr_warning("%s: unable to allocate memory\n", name);
+		pr_warn("%s: unable to allocate memory\n", name);
 		return -ENOMEM;
 	}
 
Signature · 1 line
2.20.1
#7 lore raw

PATCH v2 6/33 sparc: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 arch/sparc/kernel/smp_64.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/sparc/kernel/smp_64.c +3 -3
index a8275fea4b70..9b4506373353 100644
@@ -1673,9 +1673,9 @@ void __init setup_per_cpu_areas(void)
 					    pcpu_alloc_bootmem,
 					    pcpu_free_bootmem);
 		if (rc)
-			pr_warning("PERCPU: %s allocator failed (%d), "
-				   "falling back to page size\n",
-				   pcpu_fc_names[pcpu_chosen_fc], rc);
+			pr_warn("PERCPU: %s allocator failed (%d), "
+				"falling back to page size\n",
+				pcpu_fc_names[pcpu_chosen_fc], rc);
 	}
 	if (rc < 0)
 		rc = pcpu_page_first_chunk(PERCPU_MODULE_RESERVE,
Signature · 1 line
2.20.1
maintainer Acked-by on v2 6/33
#8 lore raw

Re: [PATCH v2 06/33] sparc: Use pr_warn instead of pr_warning

From: Kefeng Wang <[email protected]>
Date: Fri, 18 Oct 2019 11:18:23 +0800

Quoted 8 lines

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

#9 lore raw

PATCH v2 7/33 x86: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Robert Richter <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 arch/x86/kernel/amd_gart_64.c          | 12 ++++----
 arch/x86/kernel/apic/apic.c            | 41 ++++++++++++--------------
 arch/x86/kernel/setup_percpu.c         |  4 +--
 arch/x86/kernel/tboot.c                | 15 +++++-----
 arch/x86/kernel/tsc_sync.c             |  8 ++---
 arch/x86/kernel/umip.c                 |  6 ++--
 arch/x86/mm/kmmio.c                    |  7 ++---
 arch/x86/mm/mmio-mod.c                 |  6 ++--
 arch/x86/mm/numa_emulation.c           |  4 +--
 arch/x86/mm/testmmiotrace.c            |  6 ++--
 arch/x86/oprofile/op_x86_model.h       |  6 ++--
 arch/x86/platform/olpc/olpc-xo15-sci.c |  2 +-
 arch/x86/platform/sfi/sfi.c            |  3 +-
 arch/x86/xen/setup.c                   |  2 +-
 14 files changed, 57 insertions(+), 65 deletions(-)
arch/x86/kernel/amd_gart_64.c +5 -7
index a6ac3712db8b..4bbccb9d16dc 100644
@@ -510,10 +510,9 @@ static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size)
 	iommu_size -= round_up(a, PMD_PAGE_SIZE) - a;
 
 	if (iommu_size < 64*1024*1024) {
-		pr_warning(
-			"PCI-DMA: Warning: Small IOMMU %luMB."
+		pr_warn("PCI-DMA: Warning: Small IOMMU %luMB."
 			" Consider increasing the AGP aperture in BIOS\n",
-				iommu_size >> 20);
+			iommu_size >> 20);
 	}
 
 	return iommu_size;
@@ -665,8 +664,7 @@ static __init int init_amd_gatt(struct agp_kern_info *info)
 
  nommu:
 	/* Should not happen anymore */
-	pr_warning("PCI-DMA: More than 4GB of RAM and no IOMMU\n"
-	       "falling back to iommu=soft.\n");
+	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU - falling back to iommu=soft.\n");
 	return -1;
 }
 
@@ -733,8 +731,8 @@ int __init gart_iommu_init(void)
 	    !gart_iommu_aperture ||
 	    (no_agp && init_amd_gatt(&info) < 0)) {
 		if (max_pfn > MAX_DMA32_PFN) {
-			pr_warning("More than 4GB of memory but GART IOMMU not available.\n");
-			pr_warning("falling back to iommu=soft.\n");
+			pr_warn("More than 4GB of memory but GART IOMMU not available.\n");
+			pr_warn("falling back to iommu=soft.\n");
 		}
 		return 0;
 	}
arch/x86/kernel/apic/apic.c +19 -22

113 lines not on this page · raw message

arch/x86/kernel/setup_percpu.c +2 -2
index 86663874ef04..e6d7894ad127 100644
@@ -207,8 +207,8 @@ void __init setup_per_cpu_areas(void)
 					    pcpu_cpu_distance,
 					    pcpu_fc_alloc, pcpu_fc_free);
 		if (rc < 0)
-			pr_warning("%s allocator failed (%d), falling back to page size\n",
-				   pcpu_fc_names[pcpu_chosen_fc], rc);
+			pr_warn("%s allocator failed (%d), falling back to page size\n",
+				pcpu_fc_names[pcpu_chosen_fc], rc);
 	}
 	if (rc < 0)
 		rc = pcpu_page_first_chunk(PERCPU_FIRST_CHUNK_RESERVE,
arch/x86/kernel/tboot.c +7 -8
index a49fe1dcb47e..4c61f0713832 100644
@@ -57,7 +57,7 @@ void __init tboot_probe(void)
 	 */
 	if (!e820__mapped_any(boot_params.tboot_addr,
 			     boot_params.tboot_addr, E820_TYPE_RESERVED)) {
-		pr_warning("non-0 tboot_addr but it is not of type E820_TYPE_RESERVED\n");
+		pr_warn("non-0 tboot_addr but it is not of type E820_TYPE_RESERVED\n");
 		return;
 	}
 
@@ -65,13 +65,12 @@ void __init tboot_probe(void)
 	set_fixmap(FIX_TBOOT_BASE, boot_params.tboot_addr);
 	tboot = (struct tboot *)fix_to_virt(FIX_TBOOT_BASE);
 	if (memcmp(&tboot_uuid, &tboot->uuid, sizeof(tboot->uuid))) {
-		pr_warning("tboot at 0x%llx is invalid\n",
-			   boot_params.tboot_addr);
+		pr_warn("tboot at 0x%llx is invalid\n", boot_params.tboot_addr);
 		tboot = NULL;
 		return;
 	}
 	if (tboot->version < 5) {
-		pr_warning("tboot version is invalid: %u\n", tboot->version);
+		pr_warn("tboot version is invalid: %u\n", tboot->version);
 		tboot = NULL;
 		return;
 	}
@@ -289,7 +288,7 @@ static int tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control)
 
 	if (sleep_state >= ACPI_S_STATE_COUNT ||
 	    acpi_shutdown_map[sleep_state] == -1) {
-		pr_warning("unsupported sleep state 0x%x\n", sleep_state);
+		pr_warn("unsupported sleep state 0x%x\n", sleep_state);
 		return -1;
 	}
 
@@ -302,7 +301,7 @@ static int tboot_extended_sleep(u8 sleep_state, u32 val_a, u32 val_b)
 	if (!tboot_enabled())
 		return 0;
 
-	pr_warning("tboot is not able to suspend on platforms with reduced hardware sleep (ACPIv5)");
+	pr_warn("tboot is not able to suspend on platforms with reduced hardware sleep (ACPIv5)");
 	return -ENODEV;
 }
 
@@ -320,7 +319,7 @@ static int tboot_wait_for_aps(int num_aps)
 	}
 
 	if (timeout)
-		pr_warning("tboot wait for APs timeout\n");
+		pr_warn("tboot wait for APs timeout\n");
 
 	return !(atomic_read((atomic_t *)&tboot->num_in_wfs) == num_aps);
 }
@@ -516,7 +515,7 @@ int tboot_force_iommu(void)
 		return 1;
 
 	if (no_iommu || swiotlb || dmar_disabled)
-		pr_warning("Forcing Intel-IOMMU to enabled\n");
+		pr_warn("Forcing Intel-IOMMU to enabled\n");
 
 	dmar_disabled = 0;
 #ifdef CONFIG_SWIOTLB
arch/x86/kernel/tsc_sync.c +4 -4
index ec534f978867..b8acf639abd1 100644
@@ -364,12 +364,12 @@ void check_tsc_sync_source(int cpu)
 		/* Force it to 0 if random warps brought us here */
 		atomic_set(&test_runs, 0);
 
-		pr_warning("TSC synchronization [CPU#%d -> CPU#%d]:\n",
+		pr_warn("TSC synchronization [CPU#%d -> CPU#%d]:\n",
 			smp_processor_id(), cpu);
-		pr_warning("Measured %Ld cycles TSC warp between CPUs, "
-			   "turning off TSC clock.\n", max_warp);
+		pr_warn("Measured %Ld cycles TSC warp between CPUs, "
+			"turning off TSC clock.\n", max_warp);
 		if (random_warps)
-			pr_warning("TSC warped randomly between CPUs\n");
+			pr_warn("TSC warped randomly between CPUs\n");
 		mark_tsc_unstable("check_tsc_sync_source failed");
 	}
 
arch/x86/kernel/umip.c +3 -3
index 548fefed71ee..b4a304893189 100644
@@ -91,7 +91,7 @@ const char * const umip_insns[5] = {
 
 #define umip_pr_err(regs, fmt, ...) \
 	umip_printk(regs, KERN_ERR, fmt, ##__VA_ARGS__)
-#define umip_pr_warning(regs, fmt, ...) \
+#define umip_pr_warn(regs, fmt, ...) \
 	umip_printk(regs, KERN_WARNING, fmt,  ##__VA_ARGS__)
 
 /**
@@ -380,14 +380,14 @@ bool fixup_umip_exception(struct pt_regs *regs)
 	if (umip_inst < 0)
 		return false;
 
-	umip_pr_warning(regs, "%s instruction cannot be used by applications.\n",
+	umip_pr_warn(regs, "%s instruction cannot be used by applications.\n",
 			umip_insns[umip_inst]);
 
 	/* Do not emulate (spoof) SLDT or STR. */
 	if (umip_inst == UMIP_INST_STR || umip_inst == UMIP_INST_SLDT)
 		return false;
 
-	umip_pr_warning(regs, "For now, expensive software emulation returns the result.\n");
+	umip_pr_warn(regs, "For now, expensive software emulation returns the result.\n");
 
 	if (emulate_umip_insn(&insn, umip_inst, dummy_data, &dummy_data_size,
 			      user_64bit_mode(regs)))
arch/x86/mm/kmmio.c +3 -4
index 79eb55ce69a9..49d7814b59a9 100644
@@ -193,8 +193,8 @@ static int arm_kmmio_fault_page(struct kmmio_fault_page *f)
 	int ret;
 	WARN_ONCE(f->armed, KERN_ERR pr_fmt("kmmio page already armed.\n"));
 	if (f->armed) {
-		pr_warning("double-arm: addr 0x%08lx, ref %d, old %d\n",
-			   f->addr, f->count, !!f->old_presence);
+		pr_warn("double-arm: addr 0x%08lx, ref %d, old %d\n",
+			f->addr, f->count, !!f->old_presence);
 	}
 	ret = clear_page_presence(f, true);
 	WARN_ONCE(ret < 0, KERN_ERR pr_fmt("arming at 0x%08lx failed.\n"),
@@ -341,8 +341,7 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
 		 * something external causing them (f.e. using a debugger while
 		 * mmio tracing enabled), or erroneous behaviour
 		 */
-		pr_warning("unexpected debug trap on CPU %d.\n",
-			   smp_processor_id());
+		pr_warn("unexpected debug trap on CPU %d.\n", smp_processor_id());
 		goto out;
 	}
 
arch/x86/mm/mmio-mod.c +3 -3
index b8ef8557d4b3..673de6063345 100644
@@ -394,7 +394,7 @@ static void enter_uniprocessor(void)
 	}
 out:
 	if (num_online_cpus() > 1)
-		pr_warning("multiple CPUs still online, may miss events.\n");
+		pr_warn("multiple CPUs still online, may miss events.\n");
 }
 
 static void leave_uniprocessor(void)
@@ -418,8 +418,8 @@ static void leave_uniprocessor(void)
 static void enter_uniprocessor(void)
 {
 	if (num_online_cpus() > 1)
-		pr_warning("multiple CPUs are online, may miss events. "
-			   "Suggest booting with maxcpus=1 kernel argument.\n");
+		pr_warn("multiple CPUs are online, may miss events. "
+			"Suggest booting with maxcpus=1 kernel argument.\n");
 }
 
 static void leave_uniprocessor(void)
arch/x86/mm/numa_emulation.c +2 -2
index abffa0be80da..7f1d2034df1e 100644
@@ -438,7 +438,7 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
 		goto no_emu;
 
 	if (numa_cleanup_meminfo(&ei) < 0) {
-		pr_warning("NUMA: Warning: constructed meminfo invalid, disabling emulation\n");
+		pr_warn("NUMA: Warning: constructed meminfo invalid, disabling emulation\n");
 		goto no_emu;
 	}
 
@@ -449,7 +449,7 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
 		phys = memblock_find_in_range(0, PFN_PHYS(max_pfn_mapped),
 					      phys_size, PAGE_SIZE);
 		if (!phys) {
-			pr_warning("NUMA: Warning: can't allocate copy of distance table, disabling emulation\n");
+			pr_warn("NUMA: Warning: can't allocate copy of distance table, disabling emulation\n");
 			goto no_emu;
 		}
 		memblock_reserve(phys, phys_size);
arch/x86/mm/testmmiotrace.c +3 -3
index a8bd952e136d..92153d054d6c 100644
@@ -127,9 +127,9 @@ static int __init init(void)
 		return -ENXIO;
 	}
 
-	pr_warning("WARNING: mapping %lu kB @ 0x%08lx in PCI address space, "
-		   "and writing 16 kB of rubbish in there.\n",
-		   size >> 10, mmio_address);
+	pr_warn("WARNING: mapping %lu kB @ 0x%08lx in PCI address space, "
+		"and writing 16 kB of rubbish in there.\n",
+		size >> 10, mmio_address);
 	do_test(size);
 	do_test_bulk_ioremapping();
 	pr_info("All done.\n");
arch/x86/oprofile/op_x86_model.h +3 -3
index 71e8a67337e2..276cf79b5d24 100644
@@ -67,13 +67,13 @@ static inline void op_x86_warn_in_use(int counter)
 	 * cannot be monitored by any other counter, contact your
 	 * hardware or BIOS vendor.
 	 */
-	pr_warning("oprofile: counter #%d on cpu #%d may already be used\n",
-		   counter, smp_processor_id());
+	pr_warn("oprofile: counter #%d on cpu #%d may already be used\n",
+		counter, smp_processor_id());
 }
 
 static inline void op_x86_warn_reserved(int counter)
 {
-	pr_warning("oprofile: counter #%d is already reserved\n", counter);
+	pr_warn("oprofile: counter #%d is already reserved\n", counter);
 }
 
 extern u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
arch/x86/platform/olpc/olpc-xo15-sci.c +1 -1
index 6d193bb36021..089413cd944e 100644
@@ -39,7 +39,7 @@ static int set_lid_wake_behavior(bool wake_on_close)
 
 	status = acpi_execute_simple_method(NULL, "\\_SB.PCI0.LID.LIDW", wake_on_close);
 	if (ACPI_FAILURE(status)) {
-		pr_warning(PFX "failed to set lid behavior\n");
+		pr_warn(PFX "failed to set lid behavior\n");
 		return 1;
 	}
 
arch/x86/platform/sfi/sfi.c +1 -2
index bf6016f8db4e..6259563760f9 100644
@@ -26,8 +26,7 @@ static unsigned long sfi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 static void __init mp_sfi_register_lapic(u8 id)
 {
 	if (MAX_LOCAL_APIC - id <= 0) {
-		pr_warning("Processor #%d invalid (max %d)\n",
-			id, MAX_LOCAL_APIC);
+		pr_warn("Processor #%d invalid (max %d)\n", id, MAX_LOCAL_APIC);
 		return;
 	}
 
arch/x86/xen/setup.c +1 -1
index 548d1e0a5ba1..33b0e20df7fc 100644
@@ -412,7 +412,7 @@ static unsigned long __init xen_set_identity_and_remap_chunk(
 
 		remap_range_size = xen_find_pfn_range(&remap_pfn);
 		if (!remap_range_size) {
-			pr_warning("Unable to find available pfn range, not remapping identity pages\n");
+			pr_warn("Unable to find available pfn range, not remapping identity pages\n");
 			xen_set_identity_and_release_chunk(cur_pfn,
 						cur_pfn + left, nr_pages);
 			break;
Signature · 1 line
2.20.1
#10 lore raw

PATCH v2 8/33 acpi: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/acpi/apei/apei-base.c | 36 +++++++++++++++++------------------
 drivers/acpi/apei/einj.c      |  4 ++--
 drivers/acpi/apei/erst-dbg.c  |  5 ++---
 drivers/acpi/apei/ghes.c      | 25 ++++++++++++------------
 drivers/acpi/apei/hest.c      | 14 +++++++-------
 drivers/acpi/battery.c        |  2 +-
 drivers/acpi/resource.c       |  4 ++--
 7 files changed, 44 insertions(+), 46 deletions(-)
drivers/acpi/apei/apei-base.c +18 -18
index 131c35ee9ed3..1bb2a94f49a3 100644
@@ -170,7 +170,7 @@ int __apei_exec_run(struct apei_exec_context *ctx, u8 action,
 		if (ip == ctx->ip) {
 			if (entry->instruction >= ctx->instructions ||
 			    !ctx->ins_table[entry->instruction].run) {
-				pr_warning(FW_WARN APEI_PFX
+				pr_warn(FW_WARN APEI_PFX
 			"Invalid action table, unknown instruction type: %d\n",
 					   entry->instruction);
 				return -EINVAL;
@@ -211,7 +211,7 @@ static int apei_exec_for_each_entry(struct apei_exec_context *ctx,
 		if (end)
 			*end = i;
 		if (ins >= ctx->instructions || !ins_table[ins].run) {
-			pr_warning(FW_WARN APEI_PFX
+			pr_warn(FW_WARN APEI_PFX
 			"Invalid action table, unknown instruction type: %d\n",
 				   ins);
 			return -EINVAL;
@@ -579,18 +579,18 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
 	space_id = reg->space_id;
 	*paddr = get_unaligned(&reg->address);
 	if (!*paddr) {
-		pr_warning(FW_BUG APEI_PFX
-			   "Invalid physical address in GAR [0x%llx/%u/%u/%u/%u]\n",
-			   *paddr, bit_width, bit_offset, access_size_code,
-			   space_id);
+		pr_warn(FW_BUG APEI_PFX
+			"Invalid physical address in GAR [0x%llx/%u/%u/%u/%u]\n",
+			*paddr, bit_width, bit_offset, access_size_code,
+			space_id);
 		return -EINVAL;
 	}
 
 	if (access_size_code < 1 || access_size_code > 4) {
-		pr_warning(FW_BUG APEI_PFX
-			   "Invalid access size code in GAR [0x%llx/%u/%u/%u/%u]\n",
-			   *paddr, bit_width, bit_offset, access_size_code,
-			   space_id);
+		pr_warn(FW_BUG APEI_PFX
+			"Invalid access size code in GAR [0x%llx/%u/%u/%u/%u]\n",
+			*paddr, bit_width, bit_offset, access_size_code,
+			space_id);
 		return -EINVAL;
 	}
 	*access_bit_width = 1UL << (access_size_code + 2);
@@ -604,19 +604,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
 		*access_bit_width = 64;
 
 	if ((bit_width + bit_offset) > *access_bit_width) {
-		pr_warning(FW_BUG APEI_PFX
-			   "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",
-			   *paddr, bit_width, bit_offset, access_size_code,
-			   space_id);
+		pr_warn(FW_BUG APEI_PFX
+			"Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",
+			*paddr, bit_width, bit_offset, access_size_code,
+			space_id);
 		return -EINVAL;
 	}
 
 	if (space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY &&
 	    space_id != ACPI_ADR_SPACE_SYSTEM_IO) {
-		pr_warning(FW_BUG APEI_PFX
-			   "Invalid address space type in GAR [0x%llx/%u/%u/%u/%u]\n",
-			   *paddr, bit_width, bit_offset, access_size_code,
-			   space_id);
+		pr_warn(FW_BUG APEI_PFX
+			"Invalid address space type in GAR [0x%llx/%u/%u/%u/%u]\n",
+			*paddr, bit_width, bit_offset, access_size_code,
+			space_id);
 		return -EINVAL;
 	}
 
drivers/acpi/apei/einj.c +2 -2
index e430cf4caec2..086373f8ccb1 100644
@@ -172,7 +172,7 @@ static int einj_get_available_error_type(u32 *type)
 static int einj_timedout(u64 *t)
 {
 	if ((s64)*t < SPIN_UNIT) {
-		pr_warning(FW_WARN "Firmware does not respond in time\n");
+		pr_warn(FW_WARN "Firmware does not respond in time\n");
 		return 1;
 	}
 	*t -= SPIN_UNIT;
@@ -312,7 +312,7 @@ static int __einj_error_trigger(u64 trigger_paddr, u32 type,
 	}
 	rc = einj_check_trigger_header(trigger_tab);
 	if (rc) {
-		pr_warning(FW_BUG "Invalid trigger error action table.\n");
+		pr_warn(FW_BUG "Invalid trigger error action table.\n");
 		goto out_rel_header;
 	}
 
drivers/acpi/apei/erst-dbg.c +2 -3
index d0f3a46716e9..c740f0faad39 100644
@@ -118,9 +118,8 @@ static ssize_t erst_dbg_read(struct file *filp, char __user *ubuf,
 	if (rc < 0)
 		goto out;
 	if (len > ERST_DBG_RECORD_LEN_MAX) {
-		pr_warning(ERST_DBG_PFX
-			   "Record (ID: 0x%llx) length is too long: %zd\n",
-			   id, len);
+		pr_warn(ERST_DBG_PFX
+			"Record (ID: 0x%llx) length is too long: %zd\n", id, len);
 		rc = -EIO;
 		goto out;
 	}
drivers/acpi/apei/ghes.c +12 -13
index 777f6f7122b4..8906c80175e6 100644
@@ -235,10 +235,10 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
 		goto err_unmap_read_ack_addr;
 	error_block_length = generic->error_block_length;
 	if (error_block_length > GHES_ESTATUS_MAX_SIZE) {
-		pr_warning(FW_WARN GHES_PFX
-			   "Error status block length is too long: %u for "
-			   "generic hardware error source: %d.\n",
-			   error_block_length, generic->header.source_id);
+		pr_warn(FW_WARN GHES_PFX
+			"Error status block length is too long: %u for "
+			"generic hardware error source: %d.\n",
+			error_block_length, generic->header.source_id);
 		error_block_length = GHES_ESTATUS_MAX_SIZE;
 	}
 	ghes->estatus = kmalloc(error_block_length, GFP_KERNEL);
@@ -748,8 +748,8 @@ static void ghes_add_timer(struct ghes *ghes)
 	unsigned long expire;
 
 	if (!g->notify.poll_interval) {
-		pr_warning(FW_WARN GHES_PFX "Poll interval is 0 for generic hardware error source: %d, disabled.\n",
-			   g->header.source_id);
+		pr_warn(FW_WARN GHES_PFX "Poll interval is 0 for generic hardware error source: %d, disabled.\n",
+			g->header.source_id);
 		return;
 	}
 	expire = jiffies + msecs_to_jiffies(g->notify.poll_interval);
@@ -1155,21 +1155,20 @@ static int ghes_probe(struct platform_device *ghes_dev)
 		}
 		break;
 	case ACPI_HEST_NOTIFY_LOCAL:
-		pr_warning(GHES_PFX "Generic hardware error source: %d notified via local interrupt is not supported!\n",
-			   generic->header.source_id);
+		pr_warn(GHES_PFX "Generic hardware error source: %d notified via local interrupt is not supported!\n",
+			generic->header.source_id);
 		goto err;
 	default:
-		pr_warning(FW_WARN GHES_PFX "Unknown notification type: %u for generic hardware error source: %d\n",
-			   generic->notify.type, generic->header.source_id);
+		pr_warn(FW_WARN GHES_PFX "Unknown notification type: %u for generic hardware error source: %d\n",
+			generic->notify.type, generic->header.source_id);
 		goto err;
 	}
 
 	rc = -EIO;
 	if (generic->error_block_length <
 	    sizeof(struct acpi_hest_generic_status)) {
-		pr_warning(FW_BUG GHES_PFX "Invalid error block length: %u for generic hardware error source: %d\n",
-			   generic->error_block_length,
-			   generic->header.source_id);
+		pr_warn(FW_BUG GHES_PFX "Invalid error block length: %u for generic hardware error source: %d\n",
+			generic->error_block_length, generic->header.source_id);
 		goto err;
 	}
 	ghes = ghes_new(generic);
drivers/acpi/apei/hest.c +7 -7
index 267bdbf6a7bf..822402480f7d 100644
@@ -92,15 +92,15 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
 	for (i = 0; i < hest_tab->error_source_count; i++) {
 		len = hest_esrc_len(hest_hdr);
 		if (!len) {
-			pr_warning(FW_WARN HEST_PFX
-				   "Unknown or unused hardware error source "
-				   "type: %d for hardware error source: %d.\n",
-				   hest_hdr->type, hest_hdr->source_id);
+			pr_warn(FW_WARN HEST_PFX
+				"Unknown or unused hardware error source "
+				"type: %d for hardware error source: %d.\n",
+				hest_hdr->type, hest_hdr->source_id);
 			return -EINVAL;
 		}
 		if ((void *)hest_hdr + len >
 		    (void *)hest_tab + hest_tab->header.length) {
-			pr_warning(FW_BUG HEST_PFX
+			pr_warn(FW_BUG HEST_PFX
 		"Table contents overflow for hardware error source: %d.\n",
 				hest_hdr->source_id);
 			return -EINVAL;
@@ -164,8 +164,8 @@ static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
 		ghes_dev = ghes_arr->ghes_devs[i];
 		hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
 		if (hdr->source_id == hest_hdr->source_id) {
-			pr_warning(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
-				   hdr->source_id);
+			pr_warn(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
+				hdr->source_id);
 			return -EIO;
 		}
 	}
drivers/acpi/battery.c +1 -1
index 558fedf8a7a1..8f0e0c8d8c3d 100644
@@ -1176,7 +1176,7 @@ static const struct file_operations acpi_battery_alarm_fops = {
 
 static int acpi_battery_add_fs(struct acpi_device *device)
 {
-	pr_warning(PREFIX "Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
+	pr_warn(PREFIX "Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
 	if (!acpi_device_dir(device)) {
 		acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
 						     acpi_battery_dir);
drivers/acpi/resource.c +2 -2
index 2a3e392751e0..3b4448972374 100644
@@ -413,8 +413,8 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
 		u8 pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
 
 		if (triggering != trig || polarity != pol) {
-			pr_warning("ACPI: IRQ %d override to %s, %s\n", gsi,
-				   t ? "level" : "edge", p ? "low" : "high");
+			pr_warn("ACPI: IRQ %d override to %s, %s\n", gsi,
+				t ? "level" : "edge", p ? "low" : "high");
 			triggering = trig;
 			polarity = pol;
 		}
Signature · 1 line
2.20.1
#11 lore raw

PATCH v2 9/33 drbd: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/block/drbd/drbd_nl.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/block/drbd/drbd_nl.c +6 -7
index 5d52a2d32155..de2f94d0103a 100644
@@ -268,19 +268,18 @@ static int drbd_adm_prepare(struct drbd_config_context *adm_ctx,
 	/* some more paranoia, if the request was over-determined */
 	if (adm_ctx->device && adm_ctx->resource &&
 	    adm_ctx->device->resource != adm_ctx->resource) {
-		pr_warning("request: minor=%u, resource=%s; but that minor belongs to resource %s\n",
-				adm_ctx->minor, adm_ctx->resource->name,
-				adm_ctx->device->resource->name);
+		pr_warn("request: minor=%u, resource=%s; but that minor belongs to resource %s\n",
+			adm_ctx->minor, adm_ctx->resource->name,
+			adm_ctx->device->resource->name);
 		drbd_msg_put_info(adm_ctx->reply_skb, "minor exists in different resource");
 		return ERR_INVALID_REQUEST;
 	}
 	if (adm_ctx->device &&
 	    adm_ctx->volume != VOLUME_UNSPECIFIED &&
 	    adm_ctx->volume != adm_ctx->device->vnr) {
-		pr_warning("request: minor=%u, volume=%u; but that minor is volume %u in %s\n",
-				adm_ctx->minor, adm_ctx->volume,
-				adm_ctx->device->vnr,
-				adm_ctx->device->resource->name);
+		pr_warn("request: minor=%u, volume=%u; but that minor is volume %u in %s\n",
+			adm_ctx->minor, adm_ctx->volume,
+			adm_ctx->device->vnr, adm_ctx->device->resource->name);
 		drbd_msg_put_info(adm_ctx->reply_skb, "minor exists as different volume");
 		return ERR_INVALID_REQUEST;
 	}
Signature · 1 line
2.20.1
#12 lore raw

PATCH v2 10/33 gdrom: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/cdrom/gdrom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cdrom/gdrom.c +2 -2
index 6626c84f66d1..5b21dc421c94 100644
@@ -742,7 +742,7 @@ static int probe_gdrom(struct platform_device *devptr)
 	int err;
 	/* Start the device */
 	if (gdrom_execute_diagnostic() != 1) {
-		pr_warning("ATA Probe for GDROM failed\n");
+		pr_warn("ATA Probe for GDROM failed\n");
 		return -ENODEV;
 	}
 	/* Print out firmware ID */
@@ -814,7 +814,7 @@ static int probe_gdrom(struct platform_device *devptr)
 probe_fail_no_mem:
 	unregister_blkdev(gdrom_major, GDROM_DEV_NAME);
 	gdrom_major = 0;
-	pr_warning("Probe failed - error is 0x%X\n", err);
+	pr_warn("Probe failed - error is 0x%X\n", err);
 	return err;
 }
 
Signature · 1 line
2.20.1
#13 lore raw

PATCH v2 11/33 clocksource: samsung_pwm_timer: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/clocksource/samsung_pwm_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/samsung_pwm_timer.c +1 -1
index 895f53eb5771..0274219e1720 100644
@@ -430,7 +430,7 @@ static int __init samsung_pwm_alloc(struct device_node *np,
 
 	of_property_for_each_u32(np, "samsung,pwm-outputs", prop, cur, val) {
 		if (val >= SAMSUNG_PWM_NUM) {
-			pr_warning("%s: invalid channel index in samsung,pwm-outputs property\n",
+			pr_warn("%s: invalid channel index in samsung,pwm-outputs property\n",
 								__func__);
 			continue;
 		}
Signature · 1 line
2.20.1
#14 lore raw

PATCH v2 12/33 crypto: n2: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/crypto/n2_core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/n2_core.c +6 -6
index dc15b06e96ab..40b81013213e 100644
@@ -381,8 +381,8 @@ static int n2_hash_cra_init(struct crypto_tfm *tfm)
 	fallback_tfm = crypto_alloc_ahash(fallback_driver_name, 0,
 					  CRYPTO_ALG_NEED_FALLBACK);
 	if (IS_ERR(fallback_tfm)) {
-		pr_warning("Fallback driver '%s' could not be loaded!\n",
-			   fallback_driver_name);
+		pr_warn("Fallback driver '%s' could not be loaded!\n",
+			fallback_driver_name);
 		err = PTR_ERR(fallback_tfm);
 		goto out;
 	}
@@ -418,16 +418,16 @@ static int n2_hmac_cra_init(struct crypto_tfm *tfm)
 	fallback_tfm = crypto_alloc_ahash(fallback_driver_name, 0,
 					  CRYPTO_ALG_NEED_FALLBACK);
 	if (IS_ERR(fallback_tfm)) {
-		pr_warning("Fallback driver '%s' could not be loaded!\n",
-			   fallback_driver_name);
+		pr_warn("Fallback driver '%s' could not be loaded!\n",
+			fallback_driver_name);
 		err = PTR_ERR(fallback_tfm);
 		goto out;
 	}
 
 	child_shash = crypto_alloc_shash(n2alg->child_alg, 0, 0);
 	if (IS_ERR(child_shash)) {
-		pr_warning("Child shash '%s' could not be loaded!\n",
-			   n2alg->child_alg);
+		pr_warn("Child shash '%s' could not be loaded!\n",
+			n2alg->child_alg);
 		err = PTR_ERR(child_shash);
 		goto out_free_fallback;
 	}
Signature · 1 line
2.20.1
#15 lore raw

PATCH v2 13/33 ide: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/ide/tx4938ide.c | 2 +-
 drivers/ide/tx4939ide.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/ide/tx4938ide.c +1 -1
index 40a3f55b08dd..962eb92501b5 100644
@@ -46,7 +46,7 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
 	while ((shwt * 4 + wt + (wt ? 2 : 3)) * cycle < t->cycle)
 		shwt++;
 	if (shwt > 7) {
-		pr_warning("tx4938ide: SHWT violation (%d)\n", shwt);
+		pr_warn("tx4938ide: SHWT violation (%d)\n", shwt);
 		shwt = 7;
 	}
 	pr_debug("tx4938ide: ebus %d, bus cycle %dns, WT %d, SHWT %d\n",
drivers/ide/tx4939ide.c +3 -3
index 88d132edc4e3..d5e871fe840d 100644
@@ -363,9 +363,9 @@ static int tx4939ide_dma_test_irq(ide_drive_t *drive)
 	case TX4939IDE_INT_HOST | TX4939IDE_INT_XFEREND:
 		dma_stat = tx4939ide_readb(base, TX4939IDE_DMA_Stat);
 		if (!(dma_stat & ATA_DMA_INTR))
-			pr_warning("%s: weird interrupt status. "
-				   "DMA_Stat %#02x int_ctl %#04x\n",
-				   hwif->name, dma_stat, ctl);
+			pr_warn("%s: weird interrupt status. "
+				"DMA_Stat %#02x int_ctl %#04x\n",
+				hwif->name, dma_stat, ctl);
 		found = 1;
 		break;
 	}
Signature · 1 line
2.20.1
#16 lore raw

PATCH v2 14/33 idsn: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/isdn/hardware/mISDN/avmfritz.c  | 16 ++++++++--------
 drivers/isdn/hardware/mISDN/hfcmulti.c  |  8 ++++----
 drivers/isdn/hardware/mISDN/hfcpci.c    |  3 +--
 drivers/isdn/hardware/mISDN/hfcsusb.c   |  4 ++--
 drivers/isdn/hardware/mISDN/mISDNipac.c |  4 ++--
 drivers/isdn/hardware/mISDN/mISDNisar.c | 10 +++++-----
 drivers/isdn/hardware/mISDN/netjet.c    |  8 ++++----
 drivers/isdn/hardware/mISDN/w6692.c     | 12 ++++++------
 drivers/isdn/mISDN/hwchannel.c          |  7 +++----
 9 files changed, 35 insertions(+), 37 deletions(-)
drivers/isdn/hardware/mISDN/avmfritz.c +8 -8
index 1137dd152b5c..ecc1ef6c386d 100644
@@ -402,8 +402,8 @@ hdlc_empty_fifo(struct bchannel *bch, int count)
 	} else {
 		cnt = bchannel_get_rxbuf(bch, count);
 		if (cnt < 0) {
-			pr_warning("%s.B%d: No bufferspace for %d bytes\n",
-				   fc->name, bch->nr, count);
+			pr_warn("%s.B%d: No bufferspace for %d bytes\n",
+				fc->name, bch->nr, count);
 			return;
 		}
 		p = skb_put(bch->rx_skb, count);
@@ -538,8 +538,8 @@ HDLC_irq(struct bchannel *bch, u32 stat)
 	}
 	if (stat & HDLC_INT_RPR) {
 		if (stat & HDLC_STAT_RDO) {
-			pr_warning("%s: ch%d stat %x RDO\n",
-				   fc->name, bch->nr, stat);
+			pr_warn("%s: ch%d stat %x RDO\n",
+				fc->name, bch->nr, stat);
 			hdlc->ctrl.sr.xml = 0;
 			hdlc->ctrl.sr.cmd |= HDLC_CMD_RRS;
 			write_ctrl(bch, 1);
@@ -561,8 +561,8 @@ HDLC_irq(struct bchannel *bch, u32 stat)
 				    HDLC_STAT_CRCVFR) {
 					recv_Bchannel(bch, 0, false);
 				} else {
-					pr_warning("%s: got invalid frame\n",
-						   fc->name);
+					pr_warn("%s: got invalid frame\n",
+						fc->name);
 					skb_trim(bch->rx_skb, 0);
 				}
 			}
@@ -574,8 +574,8 @@ HDLC_irq(struct bchannel *bch, u32 stat)
 		 * restart transmitting the whole frame on HDLC
 		 * in transparent mode we send the next data
 		 */
-		pr_warning("%s: ch%d stat %x XDU %s\n", fc->name, bch->nr,
-			   stat, bch->tx_skb ? "tx_skb" : "no tx_skb");
+		pr_warn("%s: ch%d stat %x XDU %s\n", fc->name, bch->nr,
+			stat, bch->tx_skb ? "tx_skb" : "no tx_skb");
 		if (bch->tx_skb && bch->tx_skb->len) {
 			if (!test_bit(FLG_TRANSPARENT, &bch->Flags))
 				bch->tx_idx = 0;
drivers/isdn/hardware/mISDN/hfcmulti.c +4 -4
index 86669ec8b977..7013a3f08429 100644
@@ -2248,8 +2248,8 @@ hfcmulti_rx(struct hfc_multi *hc, int ch)
 	if (bch) {
 		maxlen = bchannel_get_rxbuf(bch, Zsize);
 		if (maxlen < 0) {
-			pr_warning("card%d.B%d: No bufferspace for %d bytes\n",
-				   hc->id + 1, bch->nr, Zsize);
+			pr_warn("card%d.B%d: No bufferspace for %d bytes\n",
+				hc->id + 1, bch->nr, Zsize);
 			return;
 		}
 		sp = &bch->rx_skb;
@@ -2260,8 +2260,8 @@ hfcmulti_rx(struct hfc_multi *hc, int ch)
 		if (*sp == NULL) {
 			*sp = mI_alloc_skb(maxlen, GFP_ATOMIC);
 			if (*sp == NULL) {
-				pr_warning("card%d: No mem for dch rx_skb\n",
-					   hc->id + 1);
+				pr_warn("card%d: No mem for dch rx_skb\n",
+					hc->id + 1);
 				return;
 			}
 		}
drivers/isdn/hardware/mISDN/hfcpci.c +1 -2
index 2330a7d24267..abdf787c1a71 100644
@@ -566,8 +566,7 @@ hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz,
 	}
 	maxlen = bchannel_get_rxbuf(bch, fcnt_rx);
 	if (maxlen < 0) {
-		pr_warning("B%d: No bufferspace for %d bytes\n",
-			   bch->nr, fcnt_rx);
+		pr_warn("B%d: No bufferspace for %d bytes\n", bch->nr, fcnt_rx);
 	} else {
 		ptr = skb_put(bch->rx_skb, fcnt_rx);
 		if (le16_to_cpu(*z2r) + fcnt_rx <= B_FIFO_SIZE + B_SUB_VAL)
drivers/isdn/hardware/mISDN/hfcsusb.c +2 -2
index 008a74a1ed44..621364bb6b12 100644
@@ -841,8 +841,8 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
 		if (maxlen < 0) {
 			if (rx_skb)
 				skb_trim(rx_skb, 0);
-			pr_warning("%s.B%d: No bufferspace for %d bytes\n",
-				   hw->name, fifo->bch->nr, len);
+			pr_warn("%s.B%d: No bufferspace for %d bytes\n",
+				hw->name, fifo->bch->nr, len);
 			spin_unlock_irqrestore(&hw->lock, flags);
 			return;
 		}
drivers/isdn/hardware/mISDN/mISDNipac.c +2 -2
index bca880213e91..ec475087fbf9 100644
@@ -936,8 +936,8 @@ hscx_empty_fifo(struct hscx_hw *hscx, u8 count)
 		hscx_cmdr(hscx, 0x80); /* RMC */
 		if (hscx->bch.rx_skb)
 			skb_trim(hscx->bch.rx_skb, 0);
-		pr_warning("%s.B%d: No bufferspace for %d bytes\n",
-			   hscx->ip->name, hscx->bch.nr, count);
+		pr_warn("%s.B%d: No bufferspace for %d bytes\n",
+			hscx->ip->name, hscx->bch.nr, count);
 		return;
 	}
 	p = skb_put(hscx->bch.rx_skb, count);
drivers/isdn/hardware/mISDN/mISDNisar.c +5 -5
index 4a3e748a1c26..096d8c5e5df9 100644
@@ -222,7 +222,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
 			goto reterror;
 		}
 		if (!poll_mbox(isar, 1000)) {
-			pr_warning("ISAR poll_mbox dkey failed\n");
+			pr_warn("ISAR poll_mbox dkey failed\n");
 			ret = -ETIME;
 			goto reterror;
 		}
@@ -432,8 +432,8 @@ isar_rcv_frame(struct isar_ch *ch)
 	case ISDN_P_B_MODEM_ASYNC:
 		maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb);
 		if (maxlen < 0) {
-			pr_warning("%s.B%d: No bufferspace for %d bytes\n",
-				   ch->is->name, ch->bch.nr, ch->is->clsb);
+			pr_warn("%s.B%d: No bufferspace for %d bytes\n",
+				ch->is->name, ch->bch.nr, ch->is->clsb);
 			ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
 			break;
 		}
@@ -443,8 +443,8 @@ isar_rcv_frame(struct isar_ch *ch)
 	case ISDN_P_B_HDLC:
 		maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb);
 		if (maxlen < 0) {
-			pr_warning("%s.B%d: No bufferspace for %d bytes\n",
-				   ch->is->name, ch->bch.nr, ch->is->clsb);
+			pr_warn("%s.B%d: No bufferspace for %d bytes\n",
+				ch->is->name, ch->bch.nr, ch->is->clsb);
 			ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
 			break;
 		}
drivers/isdn/hardware/mISDN/netjet.c +4 -4
index 61caa7e50b9a..6aae97e827b7 100644
@@ -380,8 +380,8 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt)
 	stat = bchannel_get_rxbuf(&bc->bch, cnt);
 	/* only transparent use the count here, HDLC overun is detected later */
 	if (stat == -ENOMEM) {
-		pr_warning("%s.B%d: No memory for %d bytes\n",
-			   card->name, bc->bch.nr, cnt);
+		pr_warn("%s.B%d: No memory for %d bytes\n",
+			card->name, bc->bch.nr, cnt);
 		return;
 	}
 	if (test_bit(FLG_TRANSPARENT, &bc->bch.Flags))
@@ -420,8 +420,8 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt)
 			recv_Bchannel(&bc->bch, 0, false);
 			stat = bchannel_get_rxbuf(&bc->bch, bc->bch.maxlen);
 			if (stat < 0) {
-				pr_warning("%s.B%d: No memory for %d bytes\n",
-					   card->name, bc->bch.nr, cnt);
+				pr_warn("%s.B%d: No memory for %d bytes\n",
+					card->name, bc->bch.nr, cnt);
 				return;
 			}
 		} else if (stat == -HDLC_CRC_ERROR) {
drivers/isdn/hardware/mISDN/w6692.c +6 -6
index bad55fdacd36..f3b8db7b48fe 100644
@@ -466,8 +466,8 @@ W6692_empty_Bfifo(struct w6692_ch *wch, int count)
 		WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
 		if (wch->bch.rx_skb)
 			skb_trim(wch->bch.rx_skb, 0);
-		pr_warning("%s.B%d: No bufferspace for %d bytes\n",
-			   card->name, wch->bch.nr, count);
+		pr_warn("%s.B%d: No bufferspace for %d bytes\n",
+			card->name, wch->bch.nr, count);
 		return;
 	}
 	ptr = skb_put(wch->bch.rx_skb, count);
@@ -729,8 +729,8 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
 				 wch->bch.nr, star);
 		}
 		if (star & W_B_STAR_XDOW) {
-			pr_warning("%s: B%d XDOW proto=%x\n", card->name,
-				   wch->bch.nr, wch->bch.state);
+			pr_warn("%s: B%d XDOW proto=%x\n", card->name,
+				wch->bch.nr, wch->bch.state);
 #ifdef ERROR_STATISTIC
 			wch->bch.err_xdu++;
 #endif
@@ -747,8 +747,8 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
 			return; /* handle XDOW only once */
 	}
 	if (stat & W_B_EXI_XDUN) {
-		pr_warning("%s: B%d XDUN proto=%x\n", card->name,
-			   wch->bch.nr, wch->bch.state);
+		pr_warn("%s: B%d XDUN proto=%x\n", card->name,
+			wch->bch.nr, wch->bch.state);
 #ifdef ERROR_STATISTIC
 		wch->bch.err_xdu++;
 #endif
drivers/isdn/mISDN/hwchannel.c +3 -4
index f378173bcf6f..8c93af06ed02 100644
@@ -474,8 +474,8 @@ bchannel_get_rxbuf(struct bchannel *bch, int reqlen)
 	if (bch->rx_skb) {
 		len = skb_tailroom(bch->rx_skb);
 		if (len < reqlen) {
-			pr_warning("B%d no space for %d (only %d) bytes\n",
-				   bch->nr, reqlen, len);
+			pr_warn("B%d no space for %d (only %d) bytes\n",
+				bch->nr, reqlen, len);
 			if (test_bit(FLG_TRANSPARENT, &bch->Flags)) {
 				/* send what we have now and try a new buffer */
 				recv_Bchannel(bch, 0, true);
@@ -508,8 +508,7 @@ bchannel_get_rxbuf(struct bchannel *bch, int reqlen)
 	}
 	bch->rx_skb = mI_alloc_skb(len, GFP_ATOMIC);
 	if (!bch->rx_skb) {
-		pr_warning("B%d receive no memory for %d bytes\n",
-			   bch->nr, len);
+		pr_warn("B%d receive no memory for %d bytes\n", bch->nr, len);
 		len = -ENOMEM;
 	}
 	return len;
Signature · 1 line
2.20.1
#17 lore raw

PATCH v2 15/33 macintosh: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/macintosh/windfarm_fcu_controls.c |  4 +---
 drivers/macintosh/windfarm_lm87_sensor.c  |  4 ++--
 drivers/macintosh/windfarm_pm72.c         | 22 +++++++++++-----------
 drivers/macintosh/windfarm_rm31.c         |  6 +++---
 4 files changed, 17 insertions(+), 19 deletions(-)
drivers/macintosh/windfarm_fcu_controls.c +1 -3
index 3c971297b6dc..67daeec94b44 100644
@@ -468,9 +468,7 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
 			else
 				id = ((*reg) - 0x30) / 2;
 			if (id > 7) {
-				pr_warning("wf_fcu: Can't parse "
-				       "fan ID in device-tree for %pOF\n",
-					   np);
+				pr_warn("wf_fcu: Can't parse fan ID in device-tree for %pOF\n", np);
 				break;
 			}
 			wf_fcu_add_fan(pv, name, type, id);
drivers/macintosh/windfarm_lm87_sensor.c +2 -2
index e44525b19071..b03a33b803b7 100644
@@ -124,8 +124,8 @@ static int wf_lm87_probe(struct i2c_client *client,
 		}
 	}
 	if (!name) {
-		pr_warning("wf_lm87: Unsupported sensor %pOF\n",
-			   client->dev.of_node);
+		pr_warn("wf_lm87: Unsupported sensor %pOF\n",
+			client->dev.of_node);
 		return -ENODEV;
 	}
 
drivers/macintosh/windfarm_pm72.c +11 -11
index c5da0fc24884..e81746b87cff 100644
@@ -285,8 +285,8 @@ static void cpu_fans_tick_split(void)
 		/* Apply result directly to exhaust fan */
 		err = wf_control_set(cpu_rear_fans[cpu], sp->target);
 		if (err) {
-			pr_warning("wf_pm72: Fan %s reports error %d\n",
-			       cpu_rear_fans[cpu]->name, err);
+			pr_warn("wf_pm72: Fan %s reports error %d\n",
+				cpu_rear_fans[cpu]->name, err);
 			failure_state |= FAILURE_FAN;
 			break;
 		}
@@ -296,8 +296,8 @@ static void cpu_fans_tick_split(void)
 		DBG_LOTS("  CPU%d: intake = %d RPM\n", cpu, intake);
 		err = wf_control_set(cpu_front_fans[cpu], intake);
 		if (err) {
-			pr_warning("wf_pm72: Fan %s reports error %d\n",
-			       cpu_front_fans[cpu]->name, err);
+			pr_warn("wf_pm72: Fan %s reports error %d\n",
+				cpu_front_fans[cpu]->name, err);
 			failure_state |= FAILURE_FAN;
 			break;
 		}
@@ -367,22 +367,22 @@ static void cpu_fans_tick_combined(void)
 	for (cpu = 0; cpu < nr_chips; cpu++) {
 		err = wf_control_set(cpu_rear_fans[cpu], sp->target);
 		if (err) {
-			pr_warning("wf_pm72: Fan %s reports error %d\n",
-				   cpu_rear_fans[cpu]->name, err);
+			pr_warn("wf_pm72: Fan %s reports error %d\n",
+				cpu_rear_fans[cpu]->name, err);
 			failure_state |= FAILURE_FAN;
 		}
 		err = wf_control_set(cpu_front_fans[cpu], intake);
 		if (err) {
-			pr_warning("wf_pm72: Fan %s reports error %d\n",
-				   cpu_front_fans[cpu]->name, err);
+			pr_warn("wf_pm72: Fan %s reports error %d\n",
+				cpu_front_fans[cpu]->name, err);
 			failure_state |= FAILURE_FAN;
 		}
 		err = 0;
 		if (cpu_pumps[cpu])
 			err = wf_control_set(cpu_pumps[cpu], pump);
 		if (err) {
-			pr_warning("wf_pm72: Pump %s reports error %d\n",
-				   cpu_pumps[cpu]->name, err);
+			pr_warn("wf_pm72: Pump %s reports error %d\n",
+				cpu_pumps[cpu]->name, err);
 			failure_state |= FAILURE_FAN;
 		}
 	}
@@ -561,7 +561,7 @@ static void drives_fan_tick(void)
 
 	err = wf_sensor_get(drives_temp, &temp);
 	if (err) {
-		pr_warning("wf_pm72: drive bay temp sensor error %d\n", err);
+		pr_warn("wf_pm72: drive bay temp sensor error %d\n", err);
 		failure_state |= FAILURE_SENSOR;
 		wf_control_set_max(drives_fan);
 		return;
drivers/macintosh/windfarm_rm31.c +3 -3
index 8456eb67184b..7acd1684c451 100644
@@ -281,8 +281,8 @@ static void cpu_fans_tick(void)
 		for (i = 0; i < 3; i++) {
 			err = wf_control_set(cpu_fans[cpu][i], speed);
 			if (err) {
-				pr_warning("wf_rm31: Fan %s reports error %d\n",
-					   cpu_fans[cpu][i]->name, err);
+				pr_warn("wf_rm31: Fan %s reports error %d\n",
+					cpu_fans[cpu][i]->name, err);
 				failure_state |= FAILURE_FAN;
 			}
 		}
@@ -465,7 +465,7 @@ static void slots_fan_tick(void)
 
 	err = wf_sensor_get(slots_temp, &temp);
 	if (err) {
-		pr_warning("wf_rm31: slots temp sensor error %d\n", err);
+		pr_warn("wf_rm31: slots temp sensor error %d\n", err);
 		failure_state |= FAILURE_SENSOR;
 		wf_control_set_max(slots_fan);
 		return;
Signature · 1 line
2.20.1
#18 lore raw

PATCH v2 16/33 of: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/of/fdt.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/of/fdt.c +10 -10
index d01d834b26b0..2cdf64d2456f 100644
@@ -412,8 +412,8 @@ void *__unflatten_device_tree(const void *blob,
 	/* Second pass, do actual unflattening */
 	unflatten_dt_nodes(blob, mem, dad, mynodes);
 	if (be32_to_cpup(mem + size) != 0xdeadbeef)
-		pr_warning("End of tree marker overwritten: %08x\n",
-			   be32_to_cpup(mem + size));
+		pr_warn("End of tree marker overwritten: %08x\n",
+			be32_to_cpup(mem + size));
 
 	if (detached && mynodes) {
 		of_node_set_flag(*mynodes, OF_DETACHED);
@@ -1120,25 +1120,25 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
 	size &= PAGE_MASK;
 
 	if (base > MAX_MEMBLOCK_ADDR) {
-		pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",
-				base, base + size);
+		pr_warn("Ignoring memory block 0x%llx - 0x%llx\n",
+			base, base + size);
 		return;
 	}
 
 	if (base + size - 1 > MAX_MEMBLOCK_ADDR) {
-		pr_warning("Ignoring memory range 0x%llx - 0x%llx\n",
-				((u64)MAX_MEMBLOCK_ADDR) + 1, base + size);
+		pr_warn("Ignoring memory range 0x%llx - 0x%llx\n",
+			((u64)MAX_MEMBLOCK_ADDR) + 1, base + size);
 		size = MAX_MEMBLOCK_ADDR - base + 1;
 	}
 
 	if (base + size < phys_offset) {
-		pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",
-			   base, base + size);
+		pr_warn("Ignoring memory block 0x%llx - 0x%llx\n",
+			base, base + size);
 		return;
 	}
 	if (base < phys_offset) {
-		pr_warning("Ignoring memory range 0x%llx - 0x%llx\n",
-			   base, phys_offset);
+		pr_warn("Ignoring memory range 0x%llx - 0x%llx\n",
+			base, phys_offset);
 		size -= phys_offset - base;
 		base = phys_offset;
 	}
Signature · 1 line
2.20.1
#19 lore raw

PATCH v2 17/33 oprofile: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/oprofile/oprofile_perf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/oprofile/oprofile_perf.c +4 -4
index 4b150a754890..98a63a5f8763 100644
@@ -46,8 +46,8 @@ static void op_overflow_handler(struct perf_event *event,
 	if (id != num_counters)
 		oprofile_add_sample(regs, id);
 	else
-		pr_warning("oprofile: ignoring spurious overflow "
-				"on cpu %u\n", cpu);
+		pr_warn("oprofile: ignoring spurious overflow on cpu %u\n",
+			cpu);
 }
 
 /*
@@ -88,8 +88,8 @@ static int op_create_counter(int cpu, int event)
 
 	if (pevent->state != PERF_EVENT_STATE_ACTIVE) {
 		perf_event_release_kernel(pevent);
-		pr_warning("oprofile: failed to enable event %d "
-				"on CPU %d\n", event, cpu);
+		pr_warn("oprofile: failed to enable event %d on CPU %d\n",
+			event, cpu);
 		return -EBUSY;
 	}
 
Signature · 1 line
2.20.1
#20 lore raw

PATCH v2 18/33 platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Corentin Chary <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/eeepc-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/eeepc-laptop.c +1 -1
index f3f74a9c109e..776868d5e458 100644
@@ -578,7 +578,7 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
 
 	port = acpi_get_pci_dev(handle);
 	if (!port) {
-		pr_warning("Unable to find port\n");
+		pr_warn("Unable to find port\n");
 		goto out_unlock;
 	}
 
Signature · 1 line
2.20.1
Acked-by on v2 18/33
#21 lore raw

Re: [PATCH v2 18/33] platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning

Quoted 4 lines · Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Quoted 26 lines
Cc Corentin Chary <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/eeepc-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/eeepc-laptop.c +1 -2
index f3f74a9c109e..776868d5e458 100644
@@ -578,7 +578,7 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
 
        port = acpi_get_pci_dev(handle);
        if (!port) {
-               pr_warning("Unable to find port\n");
+               pr_warn("Unable to find port\n");
                goto out_unlock;
        }
 
--

2.20.1

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#22 lore raw

PATCH v2 19/33 platform/x86: asus-laptop: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Corentin Chary <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/asus-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/asus-laptop.c +1 -1
index fc6446209854..a666fbc2e73b 100644
@@ -1148,7 +1148,7 @@ static void asus_als_switch(struct asus_laptop *asus, int value)
 		ret = write_acpi_int(asus->handle, METHOD_ALS_CONTROL, value);
 	}
 	if (ret)
-		pr_warning("Error setting light sensor switch\n");
+		pr_warn("Error setting light sensor switch\n");
 
 	asus->light_switch = value;
 }
Signature · 1 line
2.20.1
Acked-by on v2 19/33
#23 lore raw

Re: [PATCH v2 19/33] platform/x86: asus-laptop: Use pr_warn instead of pr_warning

Quoted 4 lines · Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Quoted 26 lines
Cc Corentin Chary <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/asus-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/asus-laptop.c +1 -2
index fc6446209854..a666fbc2e73b 100644
@@ -1148,7 +1148,7 @@ static void asus_als_switch(struct asus_laptop *asus, int value)
                ret = write_acpi_int(asus->handle, METHOD_ALS_CONTROL, value);
        }
        if (ret)
-               pr_warning("Error setting light sensor switch\n");
+               pr_warn("Error setting light sensor switch\n");
 
        asus->light_switch = value;
 }
--

2.20.1

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#24 lore raw

PATCH v2 20/33 platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Corentin Chary <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/intel_oaktrail.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/platform/x86/intel_oaktrail.c +5 -5
index 3c0438ba385e..1a09a75bd16d 100644
@@ -243,7 +243,7 @@ static int oaktrail_backlight_init(void)
 
 	if (IS_ERR(bd)) {
 		oaktrail_bl_device = NULL;
-		pr_warning("Unable to register backlight device\n");
+		pr_warn("Unable to register backlight device\n");
 		return PTR_ERR(bd);
 	}
 
@@ -313,20 +313,20 @@ static int __init oaktrail_init(void)
 
 	ret = platform_driver_register(&oaktrail_driver);
 	if (ret) {
-		pr_warning("Unable to register platform driver\n");
+		pr_warn("Unable to register platform driver\n");
 		goto err_driver_reg;
 	}
 
 	oaktrail_device = platform_device_alloc(DRIVER_NAME, -1);
 	if (!oaktrail_device) {
-		pr_warning("Unable to allocate platform device\n");
+		pr_warn("Unable to allocate platform device\n");
 		ret = -ENOMEM;
 		goto err_device_alloc;
 	}
 
 	ret = platform_device_add(oaktrail_device);
 	if (ret) {
-		pr_warning("Unable to add platform device\n");
+		pr_warn("Unable to add platform device\n");
 		goto err_device_add;
 	}
 
@@ -338,7 +338,7 @@ static int __init oaktrail_init(void)
 
 	ret = oaktrail_rfkill_init();
 	if (ret) {
-		pr_warning("Setup rfkill failed\n");
+		pr_warn("Setup rfkill failed\n");
 		goto err_rfkill;
 	}
 
Signature · 1 line
2.20.1
Acked-by on v2 20/33
#25 lore raw

Re: [PATCH v2 20/33] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning

Quoted 4 lines · Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Quoted 59 lines
Cc Corentin Chary <[email protected]>
Cc Darren Hart <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/intel_oaktrail.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/platform/x86/intel_oaktrail.c +5 -6
index 3c0438ba385e..1a09a75bd16d 100644
@@ -243,7 +243,7 @@ static int oaktrail_backlight_init(void)
 
        if (IS_ERR(bd)) {
                oaktrail_bl_device = NULL;
-               pr_warning("Unable to register backlight device\n");
+               pr_warn("Unable to register backlight device\n");
                return PTR_ERR(bd);
        }
 
@@ -313,20 +313,20 @@ static int __init oaktrail_init(void)
 
        ret = platform_driver_register(&oaktrail_driver);
        if (ret) {
-               pr_warning("Unable to register platform driver\n");
+               pr_warn("Unable to register platform driver\n");
                goto err_driver_reg;
        }
 
        oaktrail_device = platform_device_alloc(DRIVER_NAME, -1);
        if (!oaktrail_device) {
-               pr_warning("Unable to allocate platform device\n");
+               pr_warn("Unable to allocate platform device\n");
                ret = -ENOMEM;
                goto err_device_alloc;
        }
 
        ret = platform_device_add(oaktrail_device);
        if (ret) {
-               pr_warning("Unable to add platform device\n");
+               pr_warn("Unable to add platform device\n");
                goto err_device_add;
        }
 
@@ -338,7 +338,7 @@ static int __init oaktrail_init(void)
 
        ret = oaktrail_rfkill_init();
        if (ret) {
-               pr_warning("Setup rfkill failed\n");
+               pr_warn("Setup rfkill failed\n");
                goto err_rfkill;
        }
 
--

2.20.1

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#26 lore raw

PATCH v2 21/33 scsi: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
---
 drivers/scsi/a3000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/a3000.c +1 -1
index 222c77c9621f..b6a0432f305a 100644
@@ -39,7 +39,7 @@ static irqreturn_t a3000_intr(int irq, void *data)
 		spin_unlock_irqrestore(instance->host_lock, flags);
 		return IRQ_HANDLED;
 	}
-	pr_warning("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status);
+	pr_warn("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status);
 	return IRQ_NONE;
 }
 
Signature · 1 line
2.20.1
#27 lore raw

PATCH v2 22/33 sh/intc: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/sh/intc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/sh/intc/core.c +2 -2
index 46f0f322d4d8..8485e812d9b2 100644
@@ -100,8 +100,8 @@ static void __init intc_register_irq(struct intc_desc *desc,
 		primary = 1;
 
 	if (!data[0] && !data[1])
-		pr_warning("missing unique irq mask for irq %d (vect 0x%04x)\n",
-			   irq, irq2evt(irq));
+		pr_warn("missing unique irq mask for irq %d (vect 0x%04x)\n",
+			irq, irq2evt(irq));
 
 	data[0] = data[0] ? data[0] : intc_get_mask_handle(desc, d, enum_id, 1);
 	data[1] = data[1] ? data[1] : intc_get_prio_handle(desc, d, enum_id, 1);
Signature · 1 line
2.20.1
#28 lore raw

PATCH v2 23/33 fs: afs: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 fs/afs/flock.c     |  4 ++--
 fs/afs/inode.c     | 13 ++++++-------
 fs/afs/yfsclient.c |  4 ++--
 3 files changed, 10 insertions(+), 11 deletions(-)
fs/afs/flock.c +2 -2
index d5e5a6ddc847..0f2a94ba73cb 100644
@@ -346,8 +346,8 @@ void afs_lock_work(struct work_struct *work)
 		if (ret < 0) {
 			trace_afs_flock_ev(vnode, NULL, afs_flock_extend_fail,
 					   ret);
-			pr_warning("AFS: Failed to extend lock on {%llx:%llx} error %d\n",
-				   vnode->fid.vid, vnode->fid.vnode, ret);
+			pr_warn("AFS: Failed to extend lock on {%llx:%llx} error %d\n",
+				vnode->fid.vid, vnode->fid.vnode, ret);
 		}
 
 		spin_lock(&vnode->lock);
fs/afs/inode.c +6 -7
index 46d2d7cb461d..281470fe1183 100644
@@ -34,8 +34,7 @@ static noinline void dump_vnode(struct afs_vnode *vnode, struct afs_vnode *paren
 {
 	static unsigned long once_only;
 
-	pr_warn("kAFS: AFS vnode with undefined type %u\n",
-		vnode->status.type);
+	pr_warn("kAFS: AFS vnode with undefined type %u\n", vnode->status.type);
 	pr_warn("kAFS: A=%d m=%o s=%llx v=%llx\n",
 		vnode->status.abort_code,
 		vnode->status.mode,
@@ -175,11 +174,11 @@ static void afs_apply_status(struct afs_fs_cursor *fc,
 	BUG_ON(test_bit(AFS_VNODE_UNSET, &vnode->flags));
 
 	if (status->type != vnode->status.type) {
-		pr_warning("Vnode %llx:%llx:%x changed type %u to %u\n",
-			   vnode->fid.vid,
-			   vnode->fid.vnode,
-			   vnode->fid.unique,
-			   status->type, vnode->status.type);
+		pr_warn("Vnode %llx:%llx:%x changed type %u to %u\n",
+			vnode->fid.vid,
+			vnode->fid.vnode,
+			vnode->fid.unique,
+			status->type, vnode->status.type);
 		afs_protocol_error(NULL, -EBADMSG, afs_eproto_bad_status);
 		return;
 	}
fs/afs/yfsclient.c +2 -2
index 3ee7abf4b2d0..9ac035c17dc4 100644
@@ -152,8 +152,8 @@ static void yfs_check_req(struct afs_call *call, __be32 *bp)
 		pr_err("kAFS: %s: Request buffer overflow (%zu>%u)\n",
 		       call->type->name, len, call->request_size);
 	else if (len < call->request_size)
-		pr_warning("kAFS: %s: Request buffer underflow (%zu<%u)\n",
-			   call->type->name, len, call->request_size);
+		pr_warn("kAFS: %s: Request buffer underflow (%zu<%u)\n",
+			call->type->name, len, call->request_size);
 }
 
 /*
Signature · 1 line
2.20.1
#29 lore raw

PATCH v2 24/33 vgacon: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 drivers/video/console/vgacon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/console/vgacon.c +3 -3
index c6b3bdbbdbc9..de7b8382aba9 100644
@@ -113,9 +113,9 @@ static int __init text_mode(char *str)
 {
 	vgacon_text_mode_force = true;
 
-	pr_warning("You have booted with nomodeset. This means your GPU drivers are DISABLED\n");
-	pr_warning("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n");
-	pr_warning("Unless you actually understand what nomodeset does, you should reboot without enabling it\n");
+	pr_warn("You have booted with nomodeset. This means your GPU drivers are DISABLED\n");
+	pr_warn("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n");
+	pr_warn("Unless you actually understand what nomodeset does, you should reboot without enabling it\n");
 
 	return 1;
 }
Signature · 1 line
2.20.1
#30 lore raw

PATCH v2 25/33 dma-debug: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Christoph Hellwig <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
---
 kernel/dma/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/dma/debug.c +1 -1
index 099002d84f46..a26170469543 100644
@@ -161,7 +161,7 @@ static inline void dump_entry_trace(struct dma_debug_entry *entry)
 {
 #ifdef CONFIG_STACKTRACE
 	if (entry) {
-		pr_warning("Mapped at:\n");
+		pr_warn("Mapped at:\n");
 		stack_trace_print(entry->stack_entries, entry->stack_len, 0);
 	}
 #endif
Signature · 1 line
2.20.1
#31 lore raw

PATCH v2 26/33 trace: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 kernel/trace/trace_benchmark.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_benchmark.c +2 -2
index 80e0b2aca703..2e9a4746ea85 100644
@@ -178,14 +178,14 @@ static int benchmark_event_kthread(void *arg)
 int trace_benchmark_reg(void)
 {
 	if (!ok_to_run) {
-		pr_warning("trace benchmark cannot be started via kernel command line\n");
+		pr_warn("trace benchmark cannot be started via kernel command line\n");
 		return -EBUSY;
 	}
 
 	bm_event_thread = kthread_run(benchmark_event_kthread,
 				      NULL, "event_benchmark");
 	if (IS_ERR(bm_event_thread)) {
-		pr_warning("trace benchmark failed to create kernel thread\n");
+		pr_warn("trace benchmark failed to create kernel thread\n");
 		return PTR_ERR(bm_event_thread);
 	}
 
Signature · 1 line
2.20.1
#32 lore raw

PATCH v2 27/33 lib: cpu_rmap: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

---
 lib/cpu_rmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/cpu_rmap.c +1 -1
index 075f3788bbe4..f08d9c56f712 100644
@@ -255,7 +255,7 @@ irq_cpu_rmap_notify(struct irq_affinity_notify *notify, const cpumask_t *mask)
 
 	rc = cpu_rmap_update(glue->rmap, glue->index, mask);
 	if (rc)
-		pr_warning("irq_cpu_rmap_notify: update failed: %d\n", rc);
+		pr_warn("irq_cpu_rmap_notify: update failed: %d\n", rc);
 }
 
 /**
Signature · 1 line
2.20.1
#33 lore raw

PATCH v2 28/33 ASoC: samsung: Use pr_warn instead of pr_warning

In reply to Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Krzysztof Kozlowski <[email protected]>
Cc Sangbeom Kim <[email protected]>
Cc Sylwester Nawrocki <[email protected]>
Cc Jaroslav Kysela <[email protected]>
Cc Takashi Iwai <[email protected]>
---
 sound/soc/samsung/s3c-i2s-v2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/samsung/s3c-i2s-v2.c +3 -3
index 7e196b599be1..593be1b668d6 100644
@@ -672,13 +672,13 @@ static int s3c2412_i2s_suspend(struct snd_soc_dai *dai)
 		iismod = readl(i2s->regs + S3C2412_IISMOD);
 
 		if (iismod & S3C2412_IISCON_RXDMA_ACTIVE)
-			pr_warning("%s: RXDMA active?\n", __func__);
+			pr_warn("%s: RXDMA active?\n", __func__);
 
 		if (iismod & S3C2412_IISCON_TXDMA_ACTIVE)
-			pr_warning("%s: TXDMA active?\n", __func__);
+			pr_warn("%s: TXDMA active?\n", __func__);
 
 		if (iismod & S3C2412_IISCON_IIS_ACTIVE)
-			pr_warning("%s: IIS active\n", __func__);
+			pr_warn("%s: IIS active\n", __func__);
 	}
 
 	return 0;
Signature · 1 line
2.20.1
maintainer Reviewed-by on v2 28/33
#34 lore raw

Re: [PATCH v2 28/33] ASoC: samsung: Use pr_warn instead of pr_warning

Quoted 11 lines · Kefeng Wang

As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it.

Cc Krzysztof Kozlowski <[email protected]>
Cc Sangbeom Kim <[email protected]>

However you need to send this patch to the maintainer directly (Mark Brown <[email protected]>).

Signature · 2 lines
Thanks,
Sylwester
#35 lore raw

PATCH v2 29/33 printk: Drop pr_warning

In reply to Kefeng Wang

With all pr_warning are removed, saftely drop pr_warning definition.

Cc Petr Mladek <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 include/linux/printk.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/printk.h +1 -2
index c09d67edda3a..1e6108b8d15f 100644
@@ -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, ...) \
Signature · 1 line
2.20.1
#36 lore raw

PATCH v2 30/33 tools lib api: Renaming pr_warning to pr_warn

In reply to Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib api for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

Changing __pr_warning to __pr_warn to be consistent.

---
 tools/lib/api/debug-internal.h | 4 ++--
 tools/lib/api/debug.c          | 4 ++--
 tools/lib/api/fs/fs.c          | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
tools/lib/api/debug-internal.h +2 -2
index 80c783497d25..5a5820c11db8 100644
@@ -10,11 +10,11 @@ do {				\
 		(func)("libapi: " fmt, ##__VA_ARGS__); \
 } while (0)
 
-extern libapi_print_fn_t __pr_warning;
+extern libapi_print_fn_t __pr_warn;
 extern libapi_print_fn_t __pr_info;
 extern libapi_print_fn_t __pr_debug;
 
-#define pr_warning(fmt, ...)	__pr(__pr_warning, fmt, ##__VA_ARGS__)
+#define pr_warn(fmt, ...)	__pr(__pr_warn, fmt, ##__VA_ARGS__)
 #define pr_info(fmt, ...)	__pr(__pr_info, fmt, ##__VA_ARGS__)
 #define pr_debug(fmt, ...)	__pr(__pr_debug, fmt, ##__VA_ARGS__)
 
tools/lib/api/debug.c +2 -2
index 69b1ba3d1ee3..7708f0558e8c 100644
@@ -15,7 +15,7 @@ static int __base_pr(const char *format, ...)
 	return err;
 }
 
-libapi_print_fn_t __pr_warning = __base_pr;
+libapi_print_fn_t __pr_warn    = __base_pr;
 libapi_print_fn_t __pr_info    = __base_pr;
 libapi_print_fn_t __pr_debug;
 
@@ -23,7 +23,7 @@ void libapi_set_print(libapi_print_fn_t warn,
 		      libapi_print_fn_t info,
 		      libapi_print_fn_t debug)
 {
-	__pr_warning = warn;
+	__pr_warn    = warn;
 	__pr_info    = info;
 	__pr_debug   = debug;
 }
tools/lib/api/fs/fs.c +2 -2
index 7aba8243a0e7..11b3885e833e 100644
@@ -381,8 +381,8 @@ int filename__read_str(const char *filename, char **buf, size_t *sizep)
 		n = read(fd, bf + size, alloc_size - size);
 		if (n < 0) {
 			if (size) {
-				pr_warning("read failed %d: %s\n", errno,
-					 strerror_r(errno, sbuf, sizeof(sbuf)));
+				pr_warn("read failed %d: %s\n", errno,
+					strerror_r(errno, sbuf, sizeof(sbuf)));
 				err = 0;
 			} else
 				err = -errno;
Signature · 1 line
2.20.1
#37 lore raw

PATCH v2 31/33 tools lib bpf: Renaming pr_warning to pr_warn

In reply to Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib bpf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

---
 tools/lib/bpf/btf.c             |  56 +--
 tools/lib/bpf/btf_dump.c        |  18 +-
 tools/lib/bpf/libbpf.c          | 679 ++++++++++++++++----------------
 tools/lib/bpf/libbpf_internal.h |   8 +-
 tools/lib/bpf/xsk.c             |   4 +-
 5 files changed, 379 insertions(+), 386 deletions(-)
tools/lib/bpf/btf.c +28 -28
index 3eae8d1addfa..d72e9a79dce1 100644
@@ -390,14 +390,14 @@ struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
 	GElf_Ehdr ehdr;
 
 	if (elf_version(EV_CURRENT) == EV_NONE) {
-		pr_warning("failed to init libelf for %s\n", path);
+		pr_warn("failed to init libelf for %s\n", path);
 		return ERR_PTR(-LIBBPF_ERRNO__LIBELF);
 	}
 
 	fd = open(path, O_RDONLY);
 	if (fd < 0) {
 		err = -errno;
-		pr_warning("failed to open %s: %s\n", path, strerror(errno));
+		pr_warn("failed to open %s: %s\n", path, strerror(errno));
 		return ERR_PTR(err);
 	}
 
@@ -405,19 +405,19 @@ struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
 
 	elf = elf_begin(fd, ELF_C_READ, NULL);
 	if (!elf) {
-		pr_warning("failed to open %s as ELF file\n", path);
+		pr_warn("failed to open %s as ELF file\n", path);
 		goto done;
 	}
 	if (!gelf_getehdr(elf, &ehdr)) {
-		pr_warning("failed to get EHDR from %s\n", path);
+		pr_warn("failed to get EHDR from %s\n", path);
 		goto done;
 	}
 	if (!btf_check_endianness(&ehdr)) {
-		pr_warning("non-native ELF endianness is not supported\n");
+		pr_warn("non-native ELF endianness is not supported\n");
 		goto done;
 	}
 	if (!elf_rawdata(elf_getscn(elf, ehdr.e_shstrndx), NULL)) {
-		pr_warning("failed to get e_shstrndx from %s\n", path);
+		pr_warn("failed to get e_shstrndx from %s\n", path);
 		goto done;
 	}
 
@@ -427,29 +427,29 @@ struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
 
 		idx++;
 		if (gelf_getshdr(scn, &sh) != &sh) {
-			pr_warning("failed to get section(%d) header from %s\n",
-				   idx, path);
+			pr_warn("failed to get section(%d) header from %s\n",
+				idx, path);
 			goto done;
 		}
 		name = elf_strptr(elf, ehdr.e_shstrndx, sh.sh_name);
 		if (!name) {
-			pr_warning("failed to get section(%d) name from %s\n",
-				   idx, path);
+			pr_warn("failed to get section(%d) name from %s\n",
+				idx, path);
 			goto done;
 		}
 		if (strcmp(name, BTF_ELF_SEC) == 0) {
 			btf_data = elf_getdata(scn, 0);
 			if (!btf_data) {
-				pr_warning("failed to get section(%d, %s) data from %s\n",
-					   idx, name, path);
+				pr_warn("failed to get section(%d, %s) data from %s\n",
+					idx, name, path);
 				goto done;
 			}
 			continue;
 		} else if (btf_ext && strcmp(name, BTF_EXT_ELF_SEC) == 0) {
 			btf_ext_data = elf_getdata(scn, 0);
 			if (!btf_ext_data) {
-				pr_warning("failed to get section(%d, %s) data from %s\n",
-					   idx, name, path);
+				pr_warn("failed to get section(%d, %s) data from %s\n",
+					idx, name, path);
 				goto done;
 			}
 			continue;
@@ -600,9 +600,9 @@ int btf__load(struct btf *btf)
 			       log_buf, log_buf_size, false);
 	if (btf->fd < 0) {
 		err = -errno;
-		pr_warning("Error loading BTF: %s(%d)\n", strerror(errno), errno);
+		pr_warn("Error loading BTF: %s(%d)\n", strerror(errno), errno);
 		if (*log_buf)
-			pr_warning("%s\n", log_buf);
+			pr_warn("%s\n", log_buf);
 		goto done;
 	}
 
@@ -707,8 +707,8 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name,
 
 	if (snprintf(container_name, max_name, "____btf_map_%s", map_name) ==
 	    max_name) {
-		pr_warning("map:%s length of '____btf_map_%s' is too long\n",
-			   map_name, map_name);
+		pr_warn("map:%s length of '____btf_map_%s' is too long\n",
+			map_name, map_name);
 		return -EINVAL;
 	}
 
@@ -721,14 +721,14 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name,
 
 	container_type = btf__type_by_id(btf, container_id);
 	if (!container_type) {
-		pr_warning("map:%s cannot find BTF type for container_id:%u\n",
-			   map_name, container_id);
+		pr_warn("map:%s cannot find BTF type for container_id:%u\n",
+			map_name, container_id);
 		return -EINVAL;
 	}
 
 	if (!btf_is_struct(container_type) || btf_vlen(container_type) < 2) {
-		pr_warning("map:%s container_name:%s is an invalid container struct\n",
-			   map_name, container_name);
+		pr_warn("map:%s container_name:%s is an invalid container struct\n",
+			map_name, container_name);
 		return -EINVAL;
 	}
 
@@ -737,25 +737,25 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name,
 
 	key_size = btf__resolve_size(btf, key->type);
 	if (key_size < 0) {
-		pr_warning("map:%s invalid BTF key_type_size\n", map_name);
+		pr_warn("map:%s invalid BTF key_type_size\n", map_name);
 		return key_size;
 	}
 
 	if (expected_key_size != key_size) {
-		pr_warning("map:%s btf_key_type_size:%u != map_def_key_size:%u\n",
-			   map_name, (__u32)key_size, expected_key_size);
+		pr_warn("map:%s btf_key_type_size:%u != map_def_key_size:%u\n",
+			map_name, (__u32)key_size, expected_key_size);
 		return -EINVAL;
 	}
 
 	value_size = btf__resolve_size(btf, value->type);
 	if (value_size < 0) {
-		pr_warning("map:%s invalid BTF value_type_size\n", map_name);
+		pr_warn("map:%s invalid BTF value_type_size\n", map_name);
 		return value_size;
 	}
 
 	if (expected_value_size != value_size) {
-		pr_warning("map:%s btf_value_type_size:%u != map_def_value_size:%u\n",
-			   map_name, (__u32)value_size, expected_value_size);
+		pr_warn("map:%s btf_value_type_size:%u != map_def_value_size:%u\n",
+			map_name, (__u32)value_size, expected_value_size);
 		return -EINVAL;
 	}
 
tools/lib/bpf/btf_dump.c +9 -9
index 139812b46c7b..cb126d8fcf75 100644
@@ -428,7 +428,7 @@ static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr)
 		/* type loop, but resolvable through fwd declaration */
 		if (btf_is_composite(t) && through_ptr && t->name_off != 0)
 			return 0;
-		pr_warning("unsatisfiable type cycle, id:[%u]\n", id);
+		pr_warn("unsatisfiable type cycle, id:[%u]\n", id);
 		return -ELOOP;
 	}
 
@@ -636,8 +636,8 @@ static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id)
 			if (id == cont_id)
 				return;
 			if (t->name_off == 0) {
-				pr_warning("anonymous struct/union loop, id:[%u]\n",
-					   id);
+				pr_warn("anonymous struct/union loop, id:[%u]\n",
+					id);
 				return;
 			}
 			btf_dump_emit_struct_fwd(d, id, t);
@@ -782,7 +782,7 @@ static int btf_align_of(const struct btf *btf, __u32 id)
 		return align;
 	}
 	default:
-		pr_warning("unsupported BTF_KIND:%u\n", btf_kind(t));
+		pr_warn("unsupported BTF_KIND:%u\n", btf_kind(t));
 		return 1;
 	}
 }
@@ -1067,7 +1067,7 @@ static void btf_dump_emit_type_decl(struct btf_dump *d, __u32 id,
 			 * chain, restore stack, emit warning, and try to
 			 * proceed nevertheless
 			 */
-			pr_warning("not enough memory for decl stack:%d", err);
+			pr_warn("not enough memory for decl stack:%d", err);
 			d->decl_stack_cnt = stack_start;
 			return;
 		}
@@ -1096,8 +1096,8 @@ static void btf_dump_emit_type_decl(struct btf_dump *d, __u32 id,
 		case BTF_KIND_TYPEDEF:
 			goto done;
 		default:
-			pr_warning("unexpected type in decl chain, kind:%u, id:[%u]\n",
-				   btf_kind(t), id);
+			pr_warn("unexpected type in decl chain, kind:%u, id:[%u]\n",
+				btf_kind(t), id);
 			goto done;
 		}
 	}
@@ -1323,8 +1323,8 @@ static void btf_dump_emit_type_chain(struct btf_dump *d,
 			return;
 		}
 		default:
-			pr_warning("unexpected type in decl chain, kind:%u, id:[%u]\n",
-				   kind, id);
+			pr_warn("unexpected type in decl chain, kind:%u, id:[%u]\n",
+				kind, id);
 			return;
 		}
 
tools/lib/bpf/libbpf.c +336 -343

1,734 lines not on this page · raw message

tools/lib/bpf/libbpf_internal.h +4 -4
index a8da0f5e51f5..bd6f48ea407b 100644
@@ -59,7 +59,7 @@ do {				\
 	libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__);	\
 } while (0)
 
-#define pr_warning(fmt, ...)	__pr(LIBBPF_WARN, fmt, ##__VA_ARGS__)
+#define pr_warn(fmt, ...)	__pr(LIBBPF_WARN, fmt, ##__VA_ARGS__)
 #define pr_info(fmt, ...)	__pr(LIBBPF_INFO, fmt, ##__VA_ARGS__)
 #define pr_debug(fmt, ...)	__pr(LIBBPF_DEBUG, fmt, ##__VA_ARGS__)
 
@@ -68,7 +68,7 @@ static inline bool libbpf_validate_opts(const char *opts,
 					const char *type_name)
 {
 	if (user_sz < sizeof(size_t)) {
-		pr_warning("%s size (%zu) is too small\n", type_name, user_sz);
+		pr_warn("%s size (%zu) is too small\n", type_name, user_sz);
 		return false;
 	}
 	if (user_sz > opts_sz) {
@@ -76,8 +76,8 @@ static inline bool libbpf_validate_opts(const char *opts,
 
 		for (i = opts_sz; i < user_sz; i++) {
 			if (opts[i]) {
-				pr_warning("%s has non-zero extra bytes",
-					   type_name);
+				pr_warn("%s has non-zero extra bytes",
+					type_name);
 				return false;
 			}
 		}
tools/lib/bpf/xsk.c +2 -2
index 9d5348086203..5668828fb0a7 100644
@@ -311,7 +311,7 @@ static int xsk_load_xdp_prog(struct xsk_socket *xsk)
 				   "LGPL-2.1 or BSD-2-Clause", 0, log_buf,
 				   log_buf_size);
 	if (prog_fd < 0) {
-		pr_warning("BPF log buffer:\n%s", log_buf);
+		pr_warn("BPF log buffer:\n%s", log_buf);
 		return prog_fd;
 	}
 
@@ -499,7 +499,7 @@ int xsk_socket__create(struct xsk_socket **xsk_ptr, const char *ifname,
 		return -EFAULT;
 
 	if (umem->refcount) {
-		pr_warning("Error: shared umems not supported by libbpf.\n");
+		pr_warn("Error: shared umems not supported by libbpf.\n");
 		return -EBUSY;
 	}
 
Signature · 1 line
2.20.1
#38 lore raw

Re: [PATCH v2 31/33] tools lib bpf: Renaming pr_warning to pr_warn

Quoted 14 lines · Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib bpf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

Quoted 7 lines
---
 tools/lib/bpf/btf.c             |  56 +--
 tools/lib/bpf/btf_dump.c        |  18 +-
 tools/lib/bpf/libbpf.c          | 679 ++++++++++++++++----------------
 tools/lib/bpf/libbpf_internal.h |   8 +-
 tools/lib/bpf/xsk.c             |   4 +-
 5 files changed, 379 insertions(+), 386 deletions(-)

Nack.
I prefer this type of renaming to go via bpf tree. It's not a kernel patch. It's touching user space library which is under heavy development.
Doing any other way will cause a ton of conflicts.

maintainer
#39 lore raw

Re: [PATCH v2 31/33] tools lib bpf: Renaming pr_warning to pr_warn

Quoted 23 lines · Alexei Starovoitov
Quoted 14 lines · Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib bpf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

Quoted 7 lines
---
 tools/lib/bpf/btf.c             |  56 +--
 tools/lib/bpf/btf_dump.c        |  18 +-
 tools/lib/bpf/libbpf.c          | 679 ++++++++++++++++----------------
 tools/lib/bpf/libbpf_internal.h |   8 +-
 tools/lib/bpf/xsk.c             |   4 +-
 5 files changed, 379 insertions(+), 386 deletions(-)
Quoted 5 lines

Nack.
I prefer this type of renaming to go via bpf tree. It's not a kernel patch. It's touching user space library which is under heavy development.
Doing any other way will cause a ton of conflicts.

Fair enough. I'll ignore this patch. Could I assume that it will be taken via bpf tree, please?

I'll also postpone the patch that removes pr_warning() to avoid synchronization problems. I'll push it later when changes in bpf[*] subsystem are merged.

[*] I am going to check conflicts against 5.4-rc1. I'll probably ask more subsystems to take their changes to avoid conflicts and make it smooth.

Best Regards,
Petr

maintainer
#40 lore raw

Re: [PATCH v2 31/33] tools lib bpf: Renaming pr_warning to pr_warn

Quoted 33 lines · Petr Mladek
Quoted 23 lines · Alexei Starovoitov
Quoted 14 lines · Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib bpf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

Quoted 7 lines
---
 tools/lib/bpf/btf.c             |  56 +--
 tools/lib/bpf/btf_dump.c        |  18 +-
 tools/lib/bpf/libbpf.c          | 679 ++++++++++++++++----------------
 tools/lib/bpf/libbpf_internal.h |   8 +-
 tools/lib/bpf/xsk.c             |   4 +-
 5 files changed, 379 insertions(+), 386 deletions(-)
Quoted 5 lines

Nack.
I prefer this type of renaming to go via bpf tree. It's not a kernel patch. It's touching user space library which is under heavy development.
Doing any other way will cause a ton of conflicts.

Fair enough. I'll ignore this patch. Could I assume that it will be taken via bpf tree, please?

Quoted 7 lines

I'll also postpone the patch that removes pr_warning() to avoid synchronization problems. I'll push it later when changes in bpf[*] subsystem are merged.

[*] I am going to check conflicts against 5.4-rc1. I'll probably ask more subsystems to take their changes to avoid conflicts and make it smooth.

The stand-alone patch as-is currently doesn't apply to bpf-next. Could you spin a fresh rebase and resubmit?

Thanks,
Daniel

#41 lore raw

[bpf-next] tools lib bpf: Renaming pr_warning to pr_warn

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib bpf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

---

Based on git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

 tools/lib/bpf/btf.c             |  56 +--
 tools/lib/bpf/btf_dump.c        |  18 +-
 tools/lib/bpf/libbpf.c          | 693 ++++++++++++++++----------------
 tools/lib/bpf/libbpf_internal.h |   8 +-
 tools/lib/bpf/xsk.c             |   4 +-
 5 files changed, 386 insertions(+), 393 deletions(-)
tools/lib/bpf/btf.c +28 -28
index 3eae8d1addfa..d72e9a79dce1 100644
@@ -390,14 +390,14 @@ struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
 	GElf_Ehdr ehdr;
 
 	if (elf_version(EV_CURRENT) == EV_NONE) {
-		pr_warning("failed to init libelf for %s\n", path);
+		pr_warn("failed to init libelf for %s\n", path);
 		return ERR_PTR(-LIBBPF_ERRNO__LIBELF);
 	}
 
 	fd = open(path, O_RDONLY);
 	if (fd < 0) {
 		err = -errno;
-		pr_warning("failed to open %s: %s\n", path, strerror(errno));
+		pr_warn("failed to open %s: %s\n", path, strerror(errno));
 		return ERR_PTR(err);
 	}
 
@@ -405,19 +405,19 @@ struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
 
 	elf = elf_begin(fd, ELF_C_READ, NULL);
 	if (!elf) {
-		pr_warning("failed to open %s as ELF file\n", path);
+		pr_warn("failed to open %s as ELF file\n", path);
 		goto done;
 	}
 	if (!gelf_getehdr(elf, &ehdr)) {
-		pr_warning("failed to get EHDR from %s\n", path);
+		pr_warn("failed to get EHDR from %s\n", path);
 		goto done;
 	}
 	if (!btf_check_endianness(&ehdr)) {
-		pr_warning("non-native ELF endianness is not supported\n");
+		pr_warn("non-native ELF endianness is not supported\n");
 		goto done;
 	}
 	if (!elf_rawdata(elf_getscn(elf, ehdr.e_shstrndx), NULL)) {
-		pr_warning("failed to get e_shstrndx from %s\n", path);
+		pr_warn("failed to get e_shstrndx from %s\n", path);
 		goto done;
 	}
 
@@ -427,29 +427,29 @@ struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
 
 		idx++;
 		if (gelf_getshdr(scn, &sh) != &sh) {
-			pr_warning("failed to get section(%d) header from %s\n",
-				   idx, path);
+			pr_warn("failed to get section(%d) header from %s\n",
+				idx, path);
 			goto done;
 		}
 		name = elf_strptr(elf, ehdr.e_shstrndx, sh.sh_name);
 		if (!name) {
-			pr_warning("failed to get section(%d) name from %s\n",
-				   idx, path);
+			pr_warn("failed to get section(%d) name from %s\n",
+				idx, path);
 			goto done;
 		}
 		if (strcmp(name, BTF_ELF_SEC) == 0) {
 			btf_data = elf_getdata(scn, 0);
 			if (!btf_data) {
-				pr_warning("failed to get section(%d, %s) data from %s\n",
-					   idx, name, path);
+				pr_warn("failed to get section(%d, %s) data from %s\n",
+					idx, name, path);
 				goto done;
 			}
 			continue;
 		} else if (btf_ext && strcmp(name, BTF_EXT_ELF_SEC) == 0) {
 			btf_ext_data = elf_getdata(scn, 0);
 			if (!btf_ext_data) {
-				pr_warning("failed to get section(%d, %s) data from %s\n",
-					   idx, name, path);
+				pr_warn("failed to get section(%d, %s) data from %s\n",
+					idx, name, path);
 				goto done;
 			}
 			continue;
@@ -600,9 +600,9 @@ int btf__load(struct btf *btf)
 			       log_buf, log_buf_size, false);
 	if (btf->fd < 0) {
 		err = -errno;
-		pr_warning("Error loading BTF: %s(%d)\n", strerror(errno), errno);
+		pr_warn("Error loading BTF: %s(%d)\n", strerror(errno), errno);
 		if (*log_buf)
-			pr_warning("%s\n", log_buf);
+			pr_warn("%s\n", log_buf);
 		goto done;
 	}
 
@@ -707,8 +707,8 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name,
 
 	if (snprintf(container_name, max_name, "____btf_map_%s", map_name) ==
 	    max_name) {
-		pr_warning("map:%s length of '____btf_map_%s' is too long\n",
-			   map_name, map_name);
+		pr_warn("map:%s length of '____btf_map_%s' is too long\n",
+			map_name, map_name);
 		return -EINVAL;
 	}
 
@@ -721,14 +721,14 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name,
 
 	container_type = btf__type_by_id(btf, container_id);
 	if (!container_type) {
-		pr_warning("map:%s cannot find BTF type for container_id:%u\n",
-			   map_name, container_id);
+		pr_warn("map:%s cannot find BTF type for container_id:%u\n",
+			map_name, container_id);
 		return -EINVAL;
 	}
 
 	if (!btf_is_struct(container_type) || btf_vlen(container_type) < 2) {
-		pr_warning("map:%s container_name:%s is an invalid container struct\n",
-			   map_name, container_name);
+		pr_warn("map:%s container_name:%s is an invalid container struct\n",
+			map_name, container_name);
 		return -EINVAL;
 	}
 
@@ -737,25 +737,25 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name,
 
 	key_size = btf__resolve_size(btf, key->type);
 	if (key_size < 0) {
-		pr_warning("map:%s invalid BTF key_type_size\n", map_name);
+		pr_warn("map:%s invalid BTF key_type_size\n", map_name);
 		return key_size;
 	}
 
 	if (expected_key_size != key_size) {
-		pr_warning("map:%s btf_key_type_size:%u != map_def_key_size:%u\n",
-			   map_name, (__u32)key_size, expected_key_size);
+		pr_warn("map:%s btf_key_type_size:%u != map_def_key_size:%u\n",
+			map_name, (__u32)key_size, expected_key_size);
 		return -EINVAL;
 	}
 
 	value_size = btf__resolve_size(btf, value->type);
 	if (value_size < 0) {
-		pr_warning("map:%s invalid BTF value_type_size\n", map_name);
+		pr_warn("map:%s invalid BTF value_type_size\n", map_name);
 		return value_size;
 	}
 
 	if (expected_value_size != value_size) {
-		pr_warning("map:%s btf_value_type_size:%u != map_def_value_size:%u\n",
-			   map_name, (__u32)value_size, expected_value_size);
+		pr_warn("map:%s btf_value_type_size:%u != map_def_value_size:%u\n",
+			map_name, (__u32)value_size, expected_value_size);
 		return -EINVAL;
 	}
 
tools/lib/bpf/btf_dump.c +9 -9
index 139812b46c7b..cb126d8fcf75 100644
@@ -428,7 +428,7 @@ static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr)
 		/* type loop, but resolvable through fwd declaration */
 		if (btf_is_composite(t) && through_ptr && t->name_off != 0)
 			return 0;
-		pr_warning("unsatisfiable type cycle, id:[%u]\n", id);
+		pr_warn("unsatisfiable type cycle, id:[%u]\n", id);
 		return -ELOOP;
 	}
 
@@ -636,8 +636,8 @@ static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id)
 			if (id == cont_id)
 				return;
 			if (t->name_off == 0) {
-				pr_warning("anonymous struct/union loop, id:[%u]\n",
-					   id);
+				pr_warn("anonymous struct/union loop, id:[%u]\n",
+					id);
 				return;
 			}
 			btf_dump_emit_struct_fwd(d, id, t);
@@ -782,7 +782,7 @@ static int btf_align_of(const struct btf *btf, __u32 id)
 		return align;
 	}
 	default:
-		pr_warning("unsupported BTF_KIND:%u\n", btf_kind(t));
+		pr_warn("unsupported BTF_KIND:%u\n", btf_kind(t));
 		return 1;
 	}
 }
@@ -1067,7 +1067,7 @@ static void btf_dump_emit_type_decl(struct btf_dump *d, __u32 id,
 			 * chain, restore stack, emit warning, and try to
 			 * proceed nevertheless
 			 */
-			pr_warning("not enough memory for decl stack:%d", err);
+			pr_warn("not enough memory for decl stack:%d", err);
 			d->decl_stack_cnt = stack_start;
 			return;
 		}
@@ -1096,8 +1096,8 @@ static void btf_dump_emit_type_decl(struct btf_dump *d, __u32 id,
 		case BTF_KIND_TYPEDEF:
 			goto done;
 		default:
-			pr_warning("unexpected type in decl chain, kind:%u, id:[%u]\n",
-				   btf_kind(t), id);
+			pr_warn("unexpected type in decl chain, kind:%u, id:[%u]\n",
+				btf_kind(t), id);
 			goto done;
 		}
 	}
@@ -1323,8 +1323,8 @@ static void btf_dump_emit_type_chain(struct btf_dump *d,
 			return;
 		}
 		default:
-			pr_warning("unexpected type in decl chain, kind:%u, id:[%u]\n",
-				   kind, id);
+			pr_warn("unexpected type in decl chain, kind:%u, id:[%u]\n",
+				kind, id);
 			return;
 		}
 
tools/lib/bpf/libbpf.c +343 -350

1,765 lines not on this page · raw message

tools/lib/bpf/libbpf_internal.h +4 -4
index 5bfe85d4f8aa..b2880766e6b9 100644
@@ -43,7 +43,7 @@ do {				\
 	libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__);	\
 } while (0)
 
-#define pr_warning(fmt, ...)	__pr(LIBBPF_WARN, fmt, ##__VA_ARGS__)
+#define pr_warn(fmt, ...)	__pr(LIBBPF_WARN, fmt, ##__VA_ARGS__)
 #define pr_info(fmt, ...)	__pr(LIBBPF_INFO, fmt, ##__VA_ARGS__)
 #define pr_debug(fmt, ...)	__pr(LIBBPF_DEBUG, fmt, ##__VA_ARGS__)
 
@@ -52,7 +52,7 @@ static inline bool libbpf_validate_opts(const char *opts,
 					const char *type_name)
 {
 	if (user_sz < sizeof(size_t)) {
-		pr_warning("%s size (%zu) is too small\n", type_name, user_sz);
+		pr_warn("%s size (%zu) is too small\n", type_name, user_sz);
 		return false;
 	}
 	if (user_sz > opts_sz) {
@@ -60,8 +60,8 @@ static inline bool libbpf_validate_opts(const char *opts,
 
 		for (i = opts_sz; i < user_sz; i++) {
 			if (opts[i]) {
-				pr_warning("%s has non-zero extra bytes",
-					   type_name);
+				pr_warn("%s has non-zero extra bytes",
+					type_name);
 				return false;
 			}
 		}
tools/lib/bpf/xsk.c +2 -2
index b0f532544c91..78665005b6f7 100644
@@ -311,7 +311,7 @@ static int xsk_load_xdp_prog(struct xsk_socket *xsk)
 				   "LGPL-2.1 or BSD-2-Clause", 0, log_buf,
 				   log_buf_size);
 	if (prog_fd < 0) {
-		pr_warning("BPF log buffer:\n%s", log_buf);
+		pr_warn("BPF log buffer:\n%s", log_buf);
 		return prog_fd;
 	}
 
@@ -499,7 +499,7 @@ int xsk_socket__create(struct xsk_socket **xsk_ptr, const char *ifname,
 		return -EFAULT;
 
 	if (umem->refcount) {
-		pr_warning("Error: shared umems not supported by libbpf.\n");
+		pr_warn("Error: shared umems not supported by libbpf.\n");
 		return -EBUSY;
 	}
 
Signature · 1 line
2.20.1
maintainer Applied
#42 lore raw

Re: [bpf-next] tools lib bpf: Renaming pr_warning to pr_warn

Quoted 5 lines · Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib bpf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

Quoted 9 lines

Applied, thanks!

#43 lore raw

PATCH v2 32/33 tools perf: Renaming pr_warning to pr_warn

In reply to Kefeng Wang

For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools perf for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Jiri Olsa <[email protected]>
---
 tools/perf/arch/x86/util/intel-pt.c      |   2 +-
 tools/perf/builtin-annotate.c            |   7 +-
 tools/perf/builtin-buildid-cache.c       |  28 +++---
 tools/perf/builtin-diff.c                |  12 +--
 tools/perf/builtin-help.c                |  10 +-
 tools/perf/builtin-inject.c              |   8 +-
 tools/perf/builtin-probe.c               |  14 +--
 tools/perf/builtin-record.c              |  10 +-
 tools/perf/builtin-report.c              |   2 +-
 tools/perf/builtin-script.c              |  14 +--
 tools/perf/builtin-stat.c                |  18 ++--
 tools/perf/builtin-timechart.c           |  12 +--
 tools/perf/builtin-top.c                 |   2 +-
 tools/perf/builtin-trace.c               |   8 +-
 tools/perf/lib/internal.h                |   2 +-
 tools/perf/ui/browsers/scripts.c         |   2 +-
 tools/perf/util/bpf-loader.c             |   6 +-
 tools/perf/util/bpf-prologue.c           |   4 +-
 tools/perf/util/callchain.c              |   2 +-
 tools/perf/util/config.c                 |   8 +-
 tools/perf/util/data-convert-bt.c        |   4 +-
 tools/perf/util/data.c                   |   2 +-
 tools/perf/util/debug.c                  |   4 +-
 tools/perf/util/debug.h                  |   2 +-
 tools/perf/util/event.c                  |   4 +-
 tools/perf/util/evlist.c                 |   4 +-
 tools/perf/util/evsel.c                  |  19 ++--
 tools/perf/util/header.c                 |  20 ++--
 tools/perf/util/jitdump.c                |   4 +-
 tools/perf/util/llvm-utils.c             |  18 ++--
 tools/perf/util/machine.c                |   2 +-
 tools/perf/util/parse-branch-options.c   |   3 +-
 tools/perf/util/perf-hooks.c             |   6 +-
 tools/perf/util/probe-event.c            |  90 +++++++++---------
 tools/perf/util/probe-file.c             |  36 +++----
 tools/perf/util/probe-finder.c           | 115 +++++++++++------------
 tools/perf/util/record.c                 |  18 ++--
 tools/perf/util/session.c                |   2 +-
 tools/perf/util/srcline.c                |   6 +-
 tools/perf/util/synthetic-events.c       |  10 +-
 tools/perf/util/thread-stack.c           |   4 +-
 tools/perf/util/thread_map.c             |   2 +-
 tools/perf/util/trace-event-parse.c      |   2 +-
 tools/perf/util/unwind-libunwind-local.c |   9 +-
 44 files changed, 273 insertions(+), 284 deletions(-)
tools/perf/arch/x86/util/intel-pt.c +1 -1
index d6d26256915f..7ce07da4abb1 100644
@@ -530,7 +530,7 @@ static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
 	 */
 	if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 &&
 	    !(evsel->core.attr.config & 1)) {
-		pr_warning("pt=0 doesn't make sense, forcing pt=1\n");
+		pr_warn("pt=0 doesn't make sense, forcing pt=1\n");
 		evsel->core.attr.config |= 1;
 	}
 
tools/perf/builtin-annotate.c +3 -4
index 8db8fc9bddef..9be57f894d09 100644
@@ -269,8 +269,8 @@ static int process_sample_event(struct perf_tool *tool,
 	int ret = 0;
 
 	if (machine__resolve(machine, &al, sample) < 0) {
-		pr_warning("problem processing %d event, skipping it.\n",
-			   event->header.type);
+		pr_warn("problem processing %d event, skipping it.\n",
+			event->header.type);
 		return -1;
 	}
 
@@ -279,8 +279,7 @@ static int process_sample_event(struct perf_tool *tool,
 
 	if (!al.filtered &&
 	    perf_evsel__add_sample(evsel, sample, &al, ann, machine)) {
-		pr_warning("problem incrementing symbol count, "
-			   "skipping event\n");
+		pr_warn("problem incrementing symbol count, skipping event\n");
 		ret = -1;
 	}
 out_put:
tools/perf/builtin-buildid-cache.c +14 -14
index 39efa51d7fb3..3d81f8a94c55 100644
@@ -282,11 +282,11 @@ static bool dso__missing_buildid_cache(struct dso *dso, int parm __maybe_unused)
 		if (errno == ENOENT)
 			return false;
 
-		pr_warning("Problems with %s file, consider removing it from the cache\n",
-			   filename);
+		pr_warn("Problems with %s file, consider removing it from the cache\n",
+			filename);
 	} else if (memcmp(dso->build_id, build_id, sizeof(dso->build_id))) {
-		pr_warning("Problems with %s file, consider removing it from the cache\n",
-			   filename);
+		pr_warn("Problems with %s file, consider removing it from the cache\n",
+			filename);
 	}
 
 	return true;
@@ -447,8 +447,8 @@ int cmd_buildid_cache(int argc, const char **argv)
 							 pos->s);
 						continue;
 					}
-					pr_warning("Couldn't add %s: %s\n",
-						   pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
+					pr_warn("Couldn't add %s: %s\n",
+						pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
 				}
 
 			strlist__delete(list);
@@ -465,8 +465,8 @@ int cmd_buildid_cache(int argc, const char **argv)
 							 pos->s);
 						continue;
 					}
-					pr_warning("Couldn't remove %s: %s\n",
-						   pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
+					pr_warn("Couldn't remove %s: %s\n",
+						pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
 				}
 
 			strlist__delete(list);
@@ -483,8 +483,8 @@ int cmd_buildid_cache(int argc, const char **argv)
 							 pos->s);
 						continue;
 					}
-					pr_warning("Couldn't remove %s: %s\n",
-						   pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
+					pr_warn("Couldn't remove %s: %s\n",
+						pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
 				}
 
 			strlist__delete(list);
@@ -493,7 +493,7 @@ int cmd_buildid_cache(int argc, const char **argv)
 
 	if (purge_all) {
 		if (build_id_cache__purge_all()) {
-			pr_warning("Couldn't remove some caches. Error: %s.\n",
+			pr_warn("Couldn't remove some caches. Error: %s.\n",
 				str_error_r(errno, sbuf, sizeof(sbuf)));
 		}
 	}
@@ -511,8 +511,8 @@ int cmd_buildid_cache(int argc, const char **argv)
 							 pos->s);
 						continue;
 					}
-					pr_warning("Couldn't update %s: %s\n",
-						   pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
+					pr_warn("Couldn't update %s: %s\n",
+						pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
 				}
 
 			strlist__delete(list);
@@ -520,7 +520,7 @@ int cmd_buildid_cache(int argc, const char **argv)
 	}
 
 	if (kcore_filename && build_id_cache__add_kcore(kcore_filename, force))
-		pr_warning("Couldn't add %s\n", kcore_filename);
+		pr_warn("Couldn't add %s\n", kcore_filename);
 
 out:
 	perf_session__delete(session);
tools/perf/builtin-diff.c +6 -6
index c37a78677955..5a105338c4fa 100644
@@ -395,8 +395,8 @@ static int diff__process_sample_event(struct perf_tool *tool,
 	}
 
 	if (machine__resolve(machine, &al, sample) < 0) {
-		pr_warning("problem processing %d event, skipping it.\n",
-			   event->header.type);
+		pr_warn("problem processing %d event, skipping it.\n",
+			event->header.type);
 		return -1;
 	}
 
@@ -408,15 +408,15 @@ static int diff__process_sample_event(struct perf_tool *tool,
 	if (compute != COMPUTE_CYCLES) {
 		if (!hists__add_entry(hists, &al, NULL, NULL, NULL, sample,
 				      true)) {
-			pr_warning("problem incrementing symbol period, "
-				   "skipping event\n");
+			pr_warn("problem incrementing symbol period, "
+				"skipping event\n");
 			goto out_put;
 		}
 	} else {
 		if (!hists__add_entry_ops(hists, &block_hist_ops, &al, NULL,
 					  NULL, NULL, sample, true)) {
-			pr_warning("problem incrementing symbol period, "
-				   "skipping event\n");
+			pr_warn("problem incrementing symbol period, "
+				"skipping event\n");
 			goto out_put;
 		}
 
tools/perf/builtin-help.c +5 -5
index 3976aebe3677..36c1aa33d72f 100644
@@ -117,7 +117,7 @@ static int check_emacsclient_version(void)
 static void exec_failed(const char *cmd)
 {
 	char sbuf[STRERR_BUFSIZE];
-	pr_warning("failed to exec '%s': %s", cmd, str_error_r(errno, sbuf, sizeof(sbuf)));
+	pr_warn("failed to exec '%s': %s", cmd, str_error_r(errno, sbuf, sizeof(sbuf)));
 }
 
 static void exec_woman_emacs(const char *path, const char *page)
@@ -218,8 +218,8 @@ static void do_add_man_viewer_info(const char *name,
 
 static void unsupported_man_viewer(const char *name, const char *var)
 {
-	pr_warning("'%s': path for unsupported man viewer.\n"
-		   "Please consider using 'man.<tool>.%s' instead.", name, var);
+	pr_warn("'%s': path for unsupported man viewer.\n"
+		"Please consider using 'man.<tool>.%s' instead.", name, var);
 }
 
 static int add_man_viewer_path(const char *name,
@@ -267,7 +267,7 @@ static int add_man_viewer_info(const char *var, const char *value)
 		return add_man_viewer_cmd(name, subkey - name, value);
 	}
 
-	pr_warning("'%s': unsupported man viewer sub key.", subkey);
+	pr_warn("'%s': unsupported man viewer sub key.", subkey);
 	return 0;
 }
 
@@ -355,7 +355,7 @@ static void exec_viewer(const char *name, const char *page)
 	else if (info)
 		exec_man_cmd(info, page);
 	else
-		pr_warning("'%s': unknown man viewer.", name);
+		pr_warn("'%s': unknown man viewer.", name);
 }
 
 static int show_man_page(const char *perf_cmd)
tools/perf/builtin-inject.c +4 -4
index 372ecb3e2c06..c93f271096ba 100644
@@ -450,9 +450,9 @@ static int perf_event__inject_buildid(struct perf_tool *tool,
 				 */
 			} else {
 #ifdef HAVE_LIBELF_SUPPORT
-				pr_warning("no symbols found in %s, maybe "
-					   "install a debug package?\n",
-					   al.map->dso->long_name);
+				pr_warn("no symbols found in %s, maybe "
+					"install a debug package?\n",
+					al.map->dso->long_name);
 #endif
 			}
 		}
@@ -840,7 +840,7 @@ int cmd_inject(int argc, const char **argv)
 		return PTR_ERR(inject.session);
 
 	if (zstd_init(&(inject.session->zstd_data), 0) < 0)
-		pr_warning("Decompression initialization failed.\n");
+		pr_warn("Decompression initialization failed.\n");
 
 	if (inject.build_ids) {
 		/*
tools/perf/builtin-probe.c +7 -7
index 26bc5923e6b5..1f94481fc3bf 100644
@@ -182,7 +182,7 @@ static int opt_set_target(const struct option *opt, const char *str,
 		if (params.uprobes || strchr(str, '/')) {
 			tmp = nsinfo__realpath(str, params.nsi);
 			if (!tmp) {
-				pr_warning("Failed to get the absolute path of %s: %m\n", str);
+				pr_warn("Failed to get the absolute path of %s: %m\n", str);
 				return ret;
 			}
 		} else {
@@ -211,8 +211,8 @@ static int opt_set_target_ns(const struct option *opt __maybe_unused,
 		ns_pid = (pid_t)strtol(str, NULL, 10);
 		if (errno != 0) {
 			ret = -errno;
-			pr_warning("Failed to parse %s as a pid: %s\n", str,
-				   strerror(errno));
+			pr_warn("Failed to parse %s as a pid: %s\n", str,
+				strerror(errno));
 			return ret;
 		}
 		nsip = nsinfo__new(ns_pid);
@@ -239,8 +239,8 @@ static int opt_show_lines(const struct option *opt,
 		return 0;
 
 	if (params.command == 'L') {
-		pr_warning("Warning: more than one --line options are"
-			   " detected. Only the first one is valid.\n");
+		pr_warn("Warning: more than one --line options are"
+			" detected. Only the first one is valid.\n");
 		return 0;
 	}
 
@@ -408,7 +408,7 @@ static int del_perf_probe_caches(struct strfilter *filter)
 			continue;
 		if (probe_cache__filter_purge(cache, filter) < 0 ||
 		    probe_cache__commit(cache) < 0)
-			pr_warning("Failed to remove entries for %s\n", nd->s);
+			pr_warn("Failed to remove entries for %s\n", nd->s);
 		probe_cache__delete(cache);
 	}
 	return 0;
@@ -462,7 +462,7 @@ static int perf_del_probe_events(struct strfilter *filter)
 	}
 
 	if (ret == -ENOENT && ret2 == -ENOENT)
-		pr_warning("\"%s\" does not hit any event.\n", str);
+		pr_warn("\"%s\" does not hit any event.\n", str);
 	else
 		ret = 0;
 
tools/perf/builtin-record.c +5 -5
index 23332861de6e..501ffeaef63e 100644
@@ -790,7 +790,7 @@ static int record__open(struct record *rec)
 	}
 
 	if (symbol_conf.kptr_restrict && !perf_evlist__exclude_kernel(evlist)) {
-		pr_warning(
+		pr_warn(
 "WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n"
 "check /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid.\n\n"
 "Samples in kernel functions may not be resolved if a suitable vmlinux\n"
@@ -1323,7 +1323,7 @@ static int record__synthesize(struct record *rec, bool tail)
 	err = perf_event__synthesize_bpf_events(session, process_synthesized_event,
 						machine, opts);
 	if (err < 0)
-		pr_warning("Couldn't synthesize bpf events.\n");
+		pr_warn("Couldn't synthesize bpf events.\n");
 
 	err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->core.threads,
 					    process_synthesized_event, opts->sample_address,
@@ -1429,7 +1429,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
 	 * evlist.
 	 */
 	if (rec->tool.ordered_events && !perf_evlist__sample_id_all(rec->evlist)) {
-		pr_warning("WARNING: No sample_id_all support, falling back to unordered processing\n");
+		pr_warn("WARNING: No sample_id_all support, falling back to unordered processing\n");
 		rec->tool.ordered_events = false;
 	}
 
@@ -1874,7 +1874,7 @@ static int get_clockid_res(clockid_t clk_id, u64 *res_ns)
 	if (!clock_getres(clk_id, &res))
 		*res_ns = res.tv_nsec + res.tv_sec * NSEC_PER_SEC;
 	else
-		pr_warning("WARNING: Failed to determine specified clock resolution.\n");
+		pr_warn("WARNING: Failed to determine specified clock resolution.\n");
 
 	return 0;
 }
@@ -1990,7 +1990,7 @@ static void switch_output_size_warn(struct record *rec)
 		char buf[100];
 
 		unit_number__scnprintf(buf, sizeof(buf), wakeup_size);
-		pr_warning("WARNING: switch-output data size lower than "
+		pr_warn("WARNING: switch-output data size lower than "
 			   "wakeup kernel buffer size (%s) "
 			   "expect bigger perf.data sizes\n", buf);
 	}
tools/perf/builtin-report.c +1 -1
index aae0e57c60fb..70dccecd338a 100644
@@ -1277,7 +1277,7 @@ int cmd_report(int argc, const char **argv)
 		return ret;
 
 	if (zstd_init(&(session->zstd_data), 0) < 0)
-		pr_warning("Decompression initialization failed. Reported data may be incomplete.\n");
+		pr_warn("Decompression initialization failed. Reported data may be incomplete.\n");
 
 	if (report.queue_size) {
 		ordered_events__set_alloc_size(&session->ordered_events,
tools/perf/builtin-script.c +7 -7
index 67be8d31afab..8ee70baabf5c 100644
@@ -2686,8 +2686,8 @@ static int parse_output_fields(const struct option *opt __maybe_unused,
 		}
 
 		if (output[type].user_set)
-			pr_warning("Overriding previous field request for %s events.\n",
-				   event_type(type));
+			pr_warn("Overriding previous field request for %s events.\n",
+				event_type(type));
 
 		/* Don't override defaults for +- */
 		if (strchr(tok, '+') || strchr(tok, '-'))
@@ -2711,7 +2711,7 @@ static int parse_output_fields(const struct option *opt __maybe_unused,
 			goto parse;
 
 		if (output_set_by_user())
-			pr_warning("Overriding previous field request for all events.\n");
+			pr_warn("Overriding previous field request for all events.\n");
 
 		for (j = 0; j < OUTPUT_TYPE_MAX; ++j) {
 			output[j].fields = 0;
@@ -2758,8 +2758,8 @@ static int parse_output_fields(const struct option *opt __maybe_unused,
 			 */
 			for (j = 0; j < OUTPUT_TYPE_MAX; ++j) {
 				if (output[j].invalid_fields & all_output_options[i].field) {
-					pr_warning("\'%s\' not valid for %s events. Ignoring.\n",
-						   all_output_options[i].str, event_type(j));
+					pr_warn("\'%s\' not valid for %s events. Ignoring.\n",
+						all_output_options[i].str, event_type(j));
 				} else {
 					if (change == REMOVE) {
 						output[j].fields &= ~all_output_options[i].field;
@@ -3300,7 +3300,7 @@ int process_thread_map_event(struct perf_session *session,
 	struct perf_script *script = container_of(tool, struct perf_script, tool);
 
 	if (script->threads) {
-		pr_warning("Extra thread map event, ignoring.\n");
+		pr_warn("Extra thread map event, ignoring.\n");
 		return 0;
 	}
 
@@ -3319,7 +3319,7 @@ int process_cpu_map_event(struct perf_session *session,
 	struct perf_script *script = container_of(tool, struct perf_script, tool);
 
 	if (script->cpus) {
-		pr_warning("Extra cpu map event, ignoring.\n");
+		pr_warn("Extra cpu map event, ignoring.\n");
 		return 0;
 	}
 
tools/perf/builtin-stat.c +9 -9
index 468fc49420ce..66b3ee5cbd39 100644
@@ -332,7 +332,7 @@ static void read_counters(struct timespec *rs)
 			pr_debug("failed to read counter %s\n", counter->name);
 
 		if (ret == 0 && perf_stat_process_counter(&stat_config, counter))
-			pr_warning("failed to process counter %s\n", counter->name);
+			pr_warn("failed to process counter %s\n", counter->name);
 	}
 }
 
@@ -1486,7 +1486,7 @@ int process_stat_config_event(struct perf_session *session,
 
 	if (perf_cpu_map__empty(st->cpus)) {
 		if (st->aggr_mode != AGGR_UNSET)
-			pr_warning("warning: processing task data, aggregation mode not set\n");
+			pr_warn("warning: processing task data, aggregation mode not set\n");
 		return 0;
 	}
 
@@ -1526,7 +1526,7 @@ int process_thread_map_event(struct perf_session *session,
 	struct perf_stat *st = container_of(tool, struct perf_stat, tool);
 
 	if (st->threads) {
-		pr_warning("Extra thread map event, ignoring.\n");
+		pr_warn("Extra thread map event, ignoring.\n");
 		return 0;
 	}
 
@@ -1546,7 +1546,7 @@ int process_cpu_map_event(struct perf_session *session,
 	struct perf_cpu_map *cpus;
 
 	if (st->cpus) {
-		pr_warning("Extra cpu map event, ignoring.\n");
+		pr_warn("Extra cpu map event, ignoring.\n");
 		return 0;
 	}
 
@@ -1906,9 +1906,9 @@ int cmd_stat(int argc, const char **argv)
 			parse_options_usage(stat_usage, stat_options, "timeout", 0);
 			goto out;
 		} else
-			pr_warning("timeout < 100ms. "
-				   "The overhead percentage could be high in some cases. "
-				   "Please proceed with caution.\n");
+			pr_warn("timeout < 100ms. "
+				"The overhead percentage could be high in some cases. "
+				"Please proceed with caution.\n");
 	}
 	if (timeout && interval) {
 		pr_err("timeout option is not supported with interval-print.\n");
@@ -1984,8 +1984,8 @@ int cmd_stat(int argc, const char **argv)
 							     process_synthesized_event,
 							     &perf_stat.session->machines.host);
 		if (err) {
-			pr_warning("Couldn't synthesize the kernel mmap record, harmless, "
-				   "older tools may produce warnings about this file\n.");
+			pr_warn("Couldn't synthesize the kernel mmap record, harmless, "
+				"older tools may produce warnings about this file\n.");
 		}
 
 		if (!interval) {
tools/perf/builtin-timechart.c +6 -6
index 9e84fae9b096..b22a5054cb8e 100644
@@ -735,8 +735,8 @@ static int pid_begin_io_sample(struct timechart *tchart, int pid, int type,
 	prev = c->io_samples;
 
 	if (prev && prev->start_time && !prev->end_time) {
-		pr_warning("Skip invalid start event: "
-			   "previous event already started!\n");
+		pr_warn("Skip invalid start event: "
+			"previous event already started!\n");
 
 		/* remove previous event that has been started,
 		 * we are not sure we will ever get an end for it */
@@ -768,7 +768,7 @@ static int pid_end_io_sample(struct timechart *tchart, int pid, int type,
 	struct io_sample *sample, *prev;
 
 	if (!c) {
-		pr_warning("Invalid pidcomm!\n");
+		pr_warn("Invalid pidcomm!\n");
 		return -1;
 	}
 
@@ -778,13 +778,13 @@ static int pid_end_io_sample(struct timechart *tchart, int pid, int type,
 		return 0;
 
 	if (sample->end_time) {
-		pr_warning("Skip invalid end event: "
-			   "previous event already ended!\n");
+		pr_warn("Skip invalid end event: "
+			"previous event already ended!\n");
 		return 0;
 	}
 
 	if (sample->type != type) {
-		pr_warning("Skip invalid end event: invalid event type!\n");
+		pr_warn("Skip invalid end event: invalid event type!\n");
 		return 0;
 	}
 
tools/perf/builtin-top.c +1 -1
index 1f60124eb19b..9115ed7a791d 100644
@@ -596,7 +596,7 @@ static void perf_top__sort_new_samples(void *arg)
 	perf_top__resort_hists(t);
 
 	if (t->lost || t->drop)
-		pr_warning("Too slow to read ring buffer (change period (-c/-F) or limit CPUs (-C)\n");
+		pr_warn("Too slow to read ring buffer (change period (-c/-F) or limit CPUs (-C)\n");
 }
 
 static void stop_top(void)
tools/perf/builtin-trace.c +4 -4
index bb5130d02155..49d8f44142f9 100644
@@ -1390,9 +1390,9 @@ static char *trace__machine__resolve_kernel_addr(void *vmachine, unsigned long l
 		return NULL;
 
 	if (symbol_conf.kptr_restrict) {
-		pr_warning("Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n"
-			   "Check /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid.\n\n"
-			   "Kernel samples will not be resolved.\n");
+		pr_warn("Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n"
+			"Check /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid.\n\n"
+			"Kernel samples will not be resolved.\n");
 		machine->kptr_restrict_warned = true;
 		return NULL;
 	}
@@ -4049,7 +4049,7 @@ static int trace__config(const char *var, const char *value, void *arg)
 	} else if (!strcmp(var, "trace.show_zeros")) {
 		bool new_show_zeros = perf_config_bool(var, value);
 		if (!trace->show_arg_names && !new_show_zeros) {
-			pr_warning("trace.show_zeros has to be set when trace.show_arg_names=no\n");
+			pr_warn("trace.show_zeros has to be set when trace.show_arg_names=no\n");
 			goto out;
 		}
 		trace->show_zeros = new_show_zeros;
tools/perf/lib/internal.h +1 -1
index dc92f241732e..11292bfab2f0 100644
@@ -11,7 +11,7 @@ do {                            \
 	libperf_print(level, "libperf: " fmt, ##__VA_ARGS__);     \
 } while (0)
 
-#define pr_warning(fmt, ...)    __pr(LIBPERF_WARN, fmt, ##__VA_ARGS__)
+#define pr_warn(fmt, ...)	__pr(LIBPERF_WARN, fmt, ##__VA_ARGS__)
 #define pr_info(fmt, ...)       __pr(LIBPERF_INFO, fmt, ##__VA_ARGS__)
 #define pr_debug(fmt, ...)      __pr(LIBPERF_DEBUG, fmt, ##__VA_ARGS__)
 
tools/perf/ui/browsers/scripts.c +1 -1
index fc733a6354d4..af69bf1c7e2b 100644
@@ -158,7 +158,7 @@ void run_script(char *cmd)
 	pr_debug("Running %s\n", cmd);
 	SLang_reset_tty();
 	if (system(cmd) < 0)
-		pr_warning("Cannot run %s\n", cmd);
+		pr_warn("Cannot run %s\n", cmd);
 	/*
 	 * SLang doesn't seem to reset the whole terminal, so be more
 	 * forceful to get back to the original state.
tools/perf/util/bpf-loader.c +3 -3
index 10c187b8b8ea..900789bab05a 100644
@@ -258,9 +258,9 @@ parse_prog_config_kvpair(const char *config_str, struct perf_probe_event *pev)
 		*sep = '\0';
 		equ = strchr(line, '=');
 		if (!equ) {
-			pr_warning("WARNING: invalid config in BPF object: %s\n",
-				   line);
-			pr_warning("\tShould be 'key=value'.\n");
+			pr_warn("WARNING: invalid config in BPF object: %s\n",
+				line);
+			pr_warn("\tShould be 'key=value'.\n");
 			goto nextline;
 		}
 		*equ = '\0';
tools/perf/util/bpf-prologue.c +2 -2
index b020a8678eb9..cee4e23325ad 100644
@@ -388,8 +388,8 @@ int bpf__gen_prologue(struct probe_trace_arg *args, int nargs,
 	}
 
 	if (nargs > BPF_PROLOGUE_MAX_ARGS) {
-		pr_warning("bpf: prologue: %d arguments are dropped\n",
-			   nargs - BPF_PROLOGUE_MAX_ARGS);
+		pr_warn("bpf: prologue: %d arguments are dropped\n",
+			nargs - BPF_PROLOGUE_MAX_ARGS);
 		nargs = BPF_PROLOGUE_MAX_ARGS;
 	}
 
tools/perf/util/callchain.c +1 -1
index 9a9b56ed3f0a..2a4a2a7ee5ae 100644
@@ -569,7 +569,7 @@ fill_node(struct callchain_node *node, struct callchain_cursor *cursor)
 
 	node->val_nr = cursor->nr - cursor->pos;
 	if (!node->val_nr)
-		pr_warning("Warning: empty node in callchain tree\n");
+		pr_warn("Warning: empty node in callchain tree\n");
 
 	cursor_node = callchain_cursor_current(cursor);
 
tools/perf/util/config.c +4 -4
index 0bc9c4d7fdc5..a0ba50291806 100644
@@ -345,9 +345,9 @@ static int perf_parse_long(const char *value, long *ret)
 static void bad_config(const char *name)
 {
 	if (config_file_name)
-		pr_warning("bad config value for '%s' in %s, ignoring...\n", name, config_file_name);
+		pr_warn("bad config value for '%s' in %s, ignoring...\n", name, config_file_name);
 	else
-		pr_warning("bad config value for '%s', ignoring...\n", name);
+		pr_warn("bad config value for '%s', ignoring...\n", name);
 }
 
 int perf_config_u64(u64 *dest, const char *name, const char *value)
@@ -676,7 +676,7 @@ static int perf_config_set__init(struct perf_config_set *set)
 
 	user_config = strdup(mkpath("%s/.perfconfig", home));
 	if (user_config == NULL) {
-		pr_warning("Not enough memory to process %s/.perfconfig, ignoring it.", home);
+		pr_warn("Not enough memory to process %s/.perfconfig, ignoring it.", home);
 		goto out;
 	}
 
@@ -689,7 +689,7 @@ static int perf_config_set__init(struct perf_config_set *set)
 	ret = 0;
 
 	if (st.st_uid && (st.st_uid != geteuid())) {
-		pr_warning("File %s not owned by current user or root, ignoring it.", user_config);
+		pr_warn("File %s not owned by current user or root, ignoring it.", user_config);
 		goto out_free;
 	}
 
tools/perf/util/data-convert-bt.c +2 -2
index dbc772bfb04e..b320799d3d7f 100644
@@ -443,8 +443,8 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
 	int ret;
 
 	if (nr_elements * sizeof(u32) != raw_size)
-		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %zu bytes\n",
-			   raw_size, nr_elements * sizeof(u32) - raw_size);
+		pr_warn("Incorrect raw_size (%u) in bpf output event, skip %zu bytes\n",
+			raw_size, nr_elements * sizeof(u32) - raw_size);
 
 	len_type = bt_ctf_event_class_get_field_by_name(event_class, "raw_len");
 	len_field = bt_ctf_field_create(len_type);
tools/perf/util/data.c +1 -1
index 88fba2ba549f..693d36874cb0 100644
@@ -381,7 +381,7 @@ int perf_data__switch(struct perf_data *data,
 	 * original file.
 	 */
 	if (rename(data->path, *new_filepath))
-		pr_warning("Failed to rename %s to %s\n", data->path, *new_filepath);
+		pr_warn("Failed to rename %s to %s\n", data->path, *new_filepath);
 
 	if (!at_exit) {
 		close(data->file.fd);
tools/perf/util/debug.c +2 -2
index e55114f0336f..0b3005ef73e6 100644
@@ -247,12 +247,12 @@ static int pr_ ## __n ## _wrapper(const char *fmt, ...)	\
 	return ret;					\
 }
 
-DEBUG_WRAPPER(warning, 0);
+DEBUG_WRAPPER(warn, 0);
 DEBUG_WRAPPER(debug, 1);
 
 void perf_debug_setup(void)
 {
-	libapi_set_print(pr_warning_wrapper, pr_warning_wrapper, pr_debug_wrapper);
+	libapi_set_print(pr_warn_wrapper, pr_warn_wrapper, pr_debug_wrapper);
 }
 
 /* Obtain a backtrace and print it to stdout. */
tools/perf/util/debug.h +1 -1
index d25ae1c4cee9..5d8c45e300e1 100644
@@ -18,7 +18,7 @@ extern int debug_data_convert;
 
 #define pr_err(fmt, ...) \
 	eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_warning(fmt, ...) \
+#define pr_warn(fmt, ...) \
 	eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
 #define pr_info(fmt, ...) \
 	eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
tools/perf/util/event.c +2 -2
index fc1e5a991008..168846aea517 100644
@@ -135,8 +135,8 @@ void perf_event__read_stat_config(struct perf_stat_config *config,
 		CASE(INTERVAL,  interval)
 #undef CASE
 		default:
-			pr_warning("unknown stat config term %" PRI_lu64 "\n",
-				   event->data[i].tag);
+			pr_warn("unknown stat config term %" PRI_lu64 "\n",
+				event->data[i].tag);
 		}
 	}
 }
tools/perf/util/evlist.c +2 -2
index d277a98e62df..1885c61ce59e 100644
@@ -1681,7 +1681,7 @@ int perf_evlist__add_sb_event(struct evlist **evlist,
 		return -1;
 
 	if (!attr->sample_id_all) {
-		pr_warning("enabling sample_id_all for all side band events\n");
+		pr_warn("enabling sample_id_all for all side band events\n");
 		attr->sample_id_all = 1;
 	}
 
@@ -1737,7 +1737,7 @@ static void *perf_evlist__poll_thread(void *arg)
 				if (evsel && evsel->side_band.cb)
 					evsel->side_band.cb(event, evsel->side_band.data);
 				else
-					pr_warning("cannot locate proper evsel for the side band event\n");
+					pr_warn("cannot locate proper evsel for the side band event\n");
 
 				perf_mmap__consume(map);
 				got_data = true;
tools/perf/util/evsel.c +9 -10
index abc7fda4a0fe..ae6fb4cfb269 100644
@@ -704,9 +704,9 @@ static void __perf_evsel__config_callchain(struct evsel *evsel,
 	if (param->record_mode == CALLCHAIN_LBR) {
 		if (!opts->branch_stack) {
 			if (attr->exclude_user) {
-				pr_warning("LBR callstack option is only available "
-					   "to get user callchain information. "
-					   "Falling back to framepointers.\n");
+				pr_warn("LBR callstack option is only available "
+					"to get user callchain information. "
+					"Falling back to framepointers.\n");
 			} else {
 				perf_evsel__set_sample_bit(evsel, BRANCH_STACK);
 				attr->branch_sample_type = PERF_SAMPLE_BRANCH_USER |
@@ -715,8 +715,8 @@ static void __perf_evsel__config_callchain(struct evsel *evsel,
 							PERF_SAMPLE_BRANCH_NO_FLAGS;
 			}
 		} else
-			 pr_warning("Cannot use LBR callstack with branch stack. "
-				    "Falling back to framepointers.\n");
+			 pr_warn("Cannot use LBR callstack with branch stack. "
+				 "Falling back to framepointers.\n");
 	}
 
 	if (param->record_mode == CALLCHAIN_DWARF) {
@@ -725,9 +725,9 @@ static void __perf_evsel__config_callchain(struct evsel *evsel,
 			perf_evsel__set_sample_bit(evsel, STACK_USER);
 			if (opts->sample_user_regs && DWARF_MINIMAL_REGS != PERF_REGS_MASK) {
 				attr->sample_regs_user |= DWARF_MINIMAL_REGS;
-				pr_warning("WARNING: The use of --call-graph=dwarf may require all the user registers, "
-					   "specifying a subset with --user-regs may render DWARF unwinding unreliable, "
-					   "so the minimal registers set (IP, SP) is explicitly forced.\n");
+				pr_warn("WARNING: The use of --call-graph=dwarf may require all the user registers, "
+					"specifying a subset with --user-regs may render DWARF unwinding unreliable, "
+					"so the minimal registers set (IP, SP) is explicitly forced.\n");
 			} else {
 				attr->sample_regs_user |= PERF_REGS_MASK;
 			}
@@ -1511,8 +1511,7 @@ static bool ignore_missing_thread(struct evsel *evsel,
 	if (thread_map__remove(threads, thread))
 		return false;
 
-	pr_warning("WARNING: Ignored open failure for pid %d\n",
-		   ignore_pid);
+	pr_warn("WARNING: Ignored open failure for pid %d\n", ignore_pid);
 	return true;
 }
 
tools/perf/util/header.c +10 -10
index 86d9396cb131..59b369313832 100644
@@ -1228,7 +1228,7 @@ static int memory_node__read(struct memory_node *n, unsigned long idx)
 
 	dir = opendir(path);
 	if (!dir) {
-		pr_warning("failed: cant' open memory sysfs data\n");
+		pr_warn("failed: cant' open memory sysfs data\n");
 		return -1;
 	}
 
@@ -2683,7 +2683,7 @@ static int process_bpf_prog_info(struct feat_fd *ff, void *data __maybe_unused)
 	int err = -1;
 
 	if (ff->ph->needs_swap) {
-		pr_warning("interpreting bpf_prog_info from systems with endianity is not yet supported\n");
+		pr_warn("interpreting bpf_prog_info from systems with endianity is not yet supported\n");
 		return 0;
 	}
 
@@ -2703,7 +2703,7 @@ static int process_bpf_prog_info(struct feat_fd *ff, void *data __maybe_unused)
 			goto out;
 
 		if (info_len > sizeof(struct bpf_prog_info)) {
-			pr_warning("detected invalid bpf_prog_info\n");
+			pr_warn("detected invalid bpf_prog_info\n");
 			goto out;
 		}
 
@@ -2757,7 +2757,7 @@ static int process_bpf_btf(struct feat_fd *ff, void *data __maybe_unused)
 	int err = -1;
 
 	if (ff->ph->needs_swap) {
-		pr_warning("interpreting btf from systems with endianity is not yet supported\n");
+		pr_warn("interpreting btf from systems with endianity is not yet supported\n");
 		return 0;
 	}
 
@@ -2893,7 +2893,7 @@ static int perf_file_section__fprintf_info(struct perf_file_section *section,
 		return 0;
 	}
 	if (feat >= HEADER_LAST_FEATURE) {
-		pr_warning("unknown feature %d\n", feat);
+		pr_warn("unknown feature %d\n", feat);
 		return 0;
 	}
 	if (!feat_ops[feat].print)
@@ -3563,9 +3563,9 @@ int perf_session__read_header(struct perf_session *session)
 	 * information.  Just warn user and process it as much as it can.
 	 */
 	if (f_header.data.size == 0) {
-		pr_warning("WARNING: The %s file's data size field is 0 which is unexpected.\n"
-			   "Was the 'perf record' command properly terminated?\n",
-			   data->file.path);
+		pr_warn("WARNING: The %s file's data size field is 0 which is unexpected.\n"
+			"Was the 'perf record' command properly terminated?\n",
+			data->file.path);
 	}
 
 	if (f_header.attr_size == 0) {
@@ -3652,11 +3652,11 @@ int perf_event__process_feature(struct perf_session *session,
 	u64 feat = fe->feat_id;
 
 	if (type < 0 || type >= PERF_RECORD_HEADER_MAX) {
-		pr_warning("invalid record type %d in pipe-mode\n", type);
+		pr_warn("invalid record type %d in pipe-mode\n", type);
 		return 0;
 	}
 	if (feat == HEADER_RESERVED || feat >= HEADER_LAST_FEATURE) {
-		pr_warning("invalid record type %d in pipe-mode\n", type);
+		pr_warn("invalid record type %d in pipe-mode\n", type);
 		return -1;
 	}
 
tools/perf/util/jitdump.c +2 -2
index e3ccb0ce1938..a119010cc3b5 100644
@@ -89,7 +89,7 @@ jit_emit_elf(char *filename,
 
 	fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY, 0644);
 	if (fd == -1) {
-		pr_warning("cannot create jit ELF %s: %s\n", filename, strerror(errno));
+		pr_warn("cannot create jit ELF %s: %s\n", filename, strerror(errno));
 		return -1;
 	}
 
@@ -282,7 +282,7 @@ jit_get_next_entry(struct jit_buf_desc *jd)
 		return NULL;
 
 	if (id >= JIT_CODE_MAX) {
-		pr_warning("next_entry: unknown record type %d, skipping\n", id);
+		pr_warn("next_entry: unknown record type %d, skipping\n", id);
 	}
 	if (bs > jd->bufsize) {
 		void *n;
tools/perf/util/llvm-utils.c +9 -9
index 8b14e4a7f1dc..494a1343f3b5 100644
@@ -333,7 +333,7 @@ void llvm__get_kbuild_opts(char **kbuild_dir, char **kbuild_include_opts)
 
 	err = detect_kbuild_dir(kbuild_dir);
 	if (err) {
-		pr_warning(
+		pr_warn(
 "WARNING:\tunable to get correct kernel building directory.\n"
 "Hint:\tSet correct kbuild directory using 'kbuild-dir' option in [llvm]\n"
 "     \tsection of ~/.perfconfig or set it to \"\" to suppress kbuild\n"
@@ -348,7 +348,7 @@ void llvm__get_kbuild_opts(char **kbuild_dir, char **kbuild_include_opts)
 			     (void **)kbuild_include_opts,
 			     NULL);
 	if (err) {
-		pr_warning(
+		pr_warn(
 "WARNING:\tunable to get kernel include directories from '%s'\n"
 "Hint:\tTry set clang include options using 'clang-bpf-cmd-template'\n"
 "     \toption in [llvm] section of ~/.perfconfig and set 'kbuild-dir'\n"
@@ -399,29 +399,29 @@ void llvm__dump_obj(const char *path, void *obj_buf, size_t size)
 	char *p;
 
 	if (!obj_path) {
-		pr_warning("WARNING: Not enough memory, skip object dumping\n");
+		pr_warn("WARNING: Not enough memory, skip object dumping\n");
 		return;
 	}
 
 	p = strrchr(obj_path, '.');
 	if (!p || (strcmp(p, ".c") != 0)) {
-		pr_warning("WARNING: invalid llvm source path: '%s', skip object dumping\n",
-			   obj_path);
+		pr_warn("WARNING: invalid llvm source path: '%s', skip object dumping\n",
+			obj_path);
 		goto out;
 	}
 
 	p[1] = 'o';
 	fp = fopen(obj_path, "wb");
 	if (!fp) {
-		pr_warning("WARNING: failed to open '%s': %s, skip object dumping\n",
-			   obj_path, strerror(errno));
+		pr_warn("WARNING: failed to open '%s': %s, skip object dumping\n",
+			obj_path, strerror(errno));
 		goto out;
 	}
 
 	pr_info("LLVM: dumping %s\n", obj_path);
 	if (fwrite(obj_buf, size, 1, fp) != 1)
-		pr_warning("WARNING: failed to write to file '%s': %s, skip object dumping\n",
-			   obj_path, strerror(errno));
+		pr_warn("WARNING: failed to write to file '%s': %s, skip object dumping\n",
+			obj_path, strerror(errno));
 	fclose(fp);
 out:
 	free(obj_path);
tools/perf/util/machine.c +1 -1
index 70a9f8716a4b..e70ad3e1843e 100644
@@ -2347,7 +2347,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 		struct iterations iter[nr];
 
 		if (branch->nr > PERF_MAX_BRANCH_DEPTH) {
-			pr_warning("corrupted branch chain. skipping...\n");
+			pr_warn("corrupted branch chain. skipping...\n");
 			goto check_calls;
 		}
 
tools/perf/util/parse-branch-options.c +1 -2
index bb4aa88c50a8..ffa59286a6ed 100644
@@ -68,8 +68,7 @@ int parse_branch_str(const char *str, __u64 *mode)
 		}
 		if (!br->name) {
 			ret = -1;
-			pr_warning("unknown branch filter %s,"
-				    " check man page\n", s);
+			pr_warn("unknown branch filter %s, check man page\n", s);
 			goto error;
 		}
 
tools/perf/util/perf-hooks.c +3 -3
index 7a0ab3507bd5..ba480d0e0eaa 100644
@@ -24,8 +24,8 @@ void perf_hooks__invoke(const struct perf_hook_desc *desc)
 		return;
 
 	if (sigsetjmp(jmpbuf, 1)) {
-		pr_warning("Fatal error (SEGFAULT) in perf hook '%s'\n",
-			   desc->hook_name);
+		pr_warn("Fatal error (SEGFAULT) in perf hook '%s'\n",
+			desc->hook_name);
 		*(current_perf_hook->p_hook_func) = NULL;
 	} else {
 		current_perf_hook = desc;
@@ -68,7 +68,7 @@ int perf_hooks__set_hook(const char *hook_name,
 			continue;
 
 		if (*(perf_hooks[i]->p_hook_func))
-			pr_warning("Overwrite existing hook: %s\n", hook_name);
+			pr_warn("Overwrite existing hook: %s\n", hook_name);
 		*(perf_hooks[i]->p_hook_func) = hook_func;
 		perf_hooks[i]->hook_ctx = hook_ctx;
 		return 0;
tools/perf/util/probe-event.c +45 -45

255 lines not on this page · raw message

tools/perf/util/probe-file.c +18 -18
index b659466ea498..3ebc4f67cbe0 100644
@@ -43,31 +43,31 @@ static void print_open_warning(int err, bool uprobe)
 		else
 			config = "CONFIG_KPROBE_EVENTS";
 
-		pr_warning("%cprobe_events file does not exist"
-			   " - please rebuild kernel with %s.\n",
-			   uprobe ? 'u' : 'k', config);
+		pr_warn("%cprobe_events file does not exist"
+			" - please rebuild kernel with %s.\n",
+			uprobe ? 'u' : 'k', config);
 	} else if (err == -ENOTSUP)
-		pr_warning("Tracefs or debugfs is not mounted.\n");
+		pr_warn("Tracefs or debugfs is not mounted.\n");
 	else
-		pr_warning("Failed to open %cprobe_events: %s\n",
-			   uprobe ? 'u' : 'k',
-			   str_error_r(-err, sbuf, sizeof(sbuf)));
+		pr_warn("Failed to open %cprobe_events: %s\n",
+			uprobe ? 'u' : 'k',
+			str_error_r(-err, sbuf, sizeof(sbuf)));
 }
 
 static void print_both_open_warning(int kerr, int uerr)
 {
 	/* Both kprobes and uprobes are disabled, warn it. */
 	if (kerr == -ENOTSUP && uerr == -ENOTSUP)
-		pr_warning("Tracefs or debugfs is not mounted.\n");
+		pr_warn("Tracefs or debugfs is not mounted.\n");
 	else if (kerr == -ENOENT && uerr == -ENOENT)
-		pr_warning("Please rebuild kernel with CONFIG_KPROBE_EVENTS "
-			   "or/and CONFIG_UPROBE_EVENTS.\n");
+		pr_warn("Please rebuild kernel with CONFIG_KPROBE_EVENTS "
+			"or/and CONFIG_UPROBE_EVENTS.\n");
 	else {
 		char sbuf[STRERR_BUFSIZE];
-		pr_warning("Failed to open kprobe events: %s.\n",
-			   str_error_r(-kerr, sbuf, sizeof(sbuf)));
-		pr_warning("Failed to open uprobe events: %s.\n",
-			   str_error_r(-uerr, sbuf, sizeof(sbuf)));
+		pr_warn("Failed to open kprobe events: %s.\n",
+			str_error_r(-kerr, sbuf, sizeof(sbuf)));
+		pr_warn("Failed to open uprobe events: %s.\n",
+			str_error_r(-uerr, sbuf, sizeof(sbuf)));
 	}
 }
 
@@ -239,8 +239,8 @@ int probe_file__add_event(int fd, struct probe_trace_event *tev)
 	if (!probe_event_dry_run) {
 		if (write(fd, buf, strlen(buf)) < (int)strlen(buf)) {
 			ret = -errno;
-			pr_warning("Failed to write event: %s\n",
-				   str_error_r(errno, sbuf, sizeof(sbuf)));
+			pr_warn("Failed to write event: %s\n",
+				str_error_r(errno, sbuf, sizeof(sbuf)));
 		}
 	}
 	free(buf);
@@ -277,8 +277,8 @@ static int __del_trace_probe_event(int fd, struct str_node *ent)
 
 	return 0;
 error:
-	pr_warning("Failed to delete event: %s\n",
-		   str_error_r(-ret, buf, sizeof(buf)));
+	pr_warn("Failed to delete event: %s\n",
+		str_error_r(-ret, buf, sizeof(buf)));
 	return ret;
 }
 
tools/perf/util/probe-finder.c +55 -60

292 lines not on this page · raw message

tools/perf/util/record.c +9 -9
index 8579505c29a4..a2d013fe04bd 100644
@@ -231,11 +231,11 @@ static int record_opts__config_freq(struct record_opts *opts)
 			       max_rate);
 			return -1;
 		} else {
-			pr_warning("warning: Maximum frequency rate (%'u Hz) exceeded, throttling from %'u Hz to %'u Hz.\n"
-				   "         The limit can be raised via /proc/sys/kernel/perf_event_max_sample_rate.\n"
-				   "         The kernel will lower it when perf's interrupts take too long.\n"
-				   "         Use --strict-freq to disable this throttling, refusing to record.\n",
-				   max_rate, opts->freq, max_rate);
+			pr_warn("warning: Maximum frequency rate (%'u Hz) exceeded, throttling from %'u Hz to %'u Hz.\n"
+				"         The limit can be raised via /proc/sys/kernel/perf_event_max_sample_rate.\n"
+				"         The kernel will lower it when perf's interrupts take too long.\n"
+				"         Use --strict-freq to disable this throttling, refusing to record.\n",
+				max_rate, opts->freq, max_rate);
 
 			opts->freq = max_rate;
 		}
@@ -245,10 +245,10 @@ static int record_opts__config_freq(struct record_opts *opts)
 	 * Default frequency is over current maximum.
 	 */
 	if (max_rate < opts->freq) {
-		pr_warning("Lowering default frequency rate to %u.\n"
-			   "Please consider tweaking "
-			   "/proc/sys/kernel/perf_event_max_sample_rate.\n",
-			   max_rate);
+		pr_warn("Lowering default frequency rate to %u.\n"
+			"Please consider tweaking "
+			"/proc/sys/kernel/perf_event_max_sample_rate.\n",
+			max_rate);
 		opts->freq = max_rate;
 	}
 
tools/perf/util/session.c +1 -1
index 061bb4d6a3f5..847de4ae9f15 100644
@@ -244,7 +244,7 @@ struct perf_session *perf_session__new(struct perf_data *data,
 		 * kernel MMAP event, in perf_event__process_mmap().
 		 */
 		if (perf_session__create_kernel_maps(session) < 0)
-			pr_warning("Cannot read kernel map\n");
+			pr_warn("Cannot read kernel map\n");
 	}
 
 	/*
tools/perf/util/srcline.c +3 -3
index 6ccf6f6d09df..d770de66ceaf 100644
@@ -290,7 +290,7 @@ static int addr2line(const char *dso_name, u64 addr,
 
 	if (a2l == NULL) {
 		if (!symbol_conf.disable_add2line_warn)
-			pr_warning("addr2line_init failed for %s\n", dso_name);
+			pr_warn("addr2line_init failed for %s\n", dso_name);
 		return 0;
 	}
 
@@ -406,12 +406,12 @@ static int addr2line(const char *dso_name, u64 addr,
 
 	fp = popen(cmd, "r");
 	if (fp == NULL) {
-		pr_warning("popen failed for %s\n", dso_name);
+		pr_warn("popen failed for %s\n", dso_name);
 		return 0;
 	}
 
 	if (getline(&filename, &len, fp) < 0 || !len) {
-		pr_warning("addr2line has no output for %s\n", dso_name);
+		pr_warn("addr2line has no output for %s\n", dso_name);
 		goto out;
 	}
 
tools/perf/util/synthetic-events.c +4 -6
index 807cbca403a7..5c376ff46ab0 100644
@@ -91,8 +91,7 @@ static int perf_event__get_comm_ids(pid_t pid, char *comm, size_t len,
 	n = read(fd, bf, sizeof(bf) - 1);
 	close(fd);
 	if (n <= 0) {
-		pr_warning("Couldn't get COMM, tigd and ppid for pid %d\n",
-			   pid);
+		pr_warn("Couldn't get COMM, tigd and ppid for pid %d\n", pid);
 		return -1;
 	}
 	bf[n] = '\0';
@@ -320,10 +319,9 @@ int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 			break;
 
 		if ((rdclock() - t) > timeout) {
-			pr_warning("Reading %s time out. "
-				   "You may want to increase "
-				   "the time limit by --proc-map-timeout\n",
-				   filename);
+			pr_warn("Reading %s time out. You may want to increase "
+				"the time limit by --proc-map-timeout\n",
+				filename);
 			truncation = true;
 			goto out;
 		}
tools/perf/util/thread-stack.c +2 -2
index cd8a948d03ec..2e21f88746d1 100644
@@ -220,7 +220,7 @@ static int thread_stack__push(struct thread_stack *ts, u64 ret_addr,
 	if (ts->cnt == ts->sz) {
 		err = thread_stack__grow(ts);
 		if (err) {
-			pr_warning("Out of memory: discarding thread stack\n");
+			pr_warn("Out of memory: discarding thread stack\n");
 			ts->cnt = 0;
 		}
 	}
@@ -364,7 +364,7 @@ int thread_stack__event(struct thread *thread, int cpu, u32 flags, u64 from_ip,
 	if (!ts) {
 		ts = thread_stack__new(thread, cpu, NULL);
 		if (!ts) {
-			pr_warning("Out of memory: no thread stack\n");
+			pr_warn("Out of memory: no thread stack\n");
 			return -ENOMEM;
 		}
 		ts->trace_nr = trace_nr;
tools/perf/util/thread_map.c +1 -1
index c9bfe4696943..e0dea5b46931 100644
@@ -355,7 +355,7 @@ static void comm_init(struct perf_thread_map *map, int i)
 	 * so just warn if we fail for any reason.
 	 */
 	if (get_comm(&comm, pid))
-		pr_warning("Couldn't resolve comm name for pid %d\n", pid);
+		pr_warn("Couldn't resolve comm name for pid %d\n", pid);
 
 	map->map[i].comm = comm;
 }
tools/perf/util/trace-event-parse.c +1 -1
index 5d6bfc70b210..9433bbabcbda 100644
@@ -134,7 +134,7 @@ void parse_ftrace_printk(struct tep_handle *pevent,
 	while (line) {
 		addr_str = strtok_r(line, ":", &fmt);
 		if (!addr_str) {
-			pr_warning("printk format with empty entry");
+			pr_warn("printk format with empty entry");
 			break;
 		}
 		addr = strtoull(addr_str, NULL, 16);
tools/perf/util/unwind-libunwind-local.c +4 -5
index 1800887b2255..c9314f3d05bf 100644
@@ -340,11 +340,10 @@ static int read_unwind_spec_debug_frame(struct dso *dso,
 			}
 			if (ofs > 0) {
 				if (dso->symsrc_filename != NULL) {
-					pr_warning(
-						"%s: overwrite symsrc(%s,%s)\n",
-							__func__,
-							dso->symsrc_filename,
-							debuglink);
+					pr_warn("%s: overwrite symsrc(%s,%s)\n",
+						__func__,
+						dso->symsrc_filename,
+						debuglink);
 					zfree(&dso->symsrc_filename);
 				}
 				dso->symsrc_filename = debuglink;
Signature · 1 line
2.20.1
#44 lore raw

PATCH v2 33/33 checkpatch: Drop pr_warning check

In reply to Kefeng Wang

For now, all pr_warning are removed, delete pr_warning check in checkpatch.

---
 scripts/checkpatch.pl | 9 ---------
 1 file changed, 9 deletions(-)
scripts/checkpatch.pl +0 -9
index a85d719df1f4..ac9b6a3f1547 100755
@@ -4135,15 +4135,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);
Signature · 1 line
2.20.1
maintainer
#45 lore raw
In reply to Kefeng Wang
Quoted 9 lines · Kefeng Wang

There are pr_warning and pr_warng to show WARNING level message, most of the code using pr_warn, number based on next-20191017,

pr_warn: 5206 pr_warning: 546 (tools: 399, others: 147)

Let's carry on with the work to standardize the logging macro, kill pr_warning in the whole linux code.

Patch[01-28]: simply sed and ajust formats

All these patches have been commited in printk.git, branch for-5.5-pr-warn.

Quoted 2 lines

patch[29]: drop pr_warning definition in printk
patch[33]: cleanup the checkpatch.pl

I'll wait with these two until I am sure that the are no pr_warning() users in linux-next.

Quoted 1 line

patch[30-32]: tools api/bpf/perf, rename and make manually changes

Only the tool api patch is commited in printk.git.

The other two (bpf and perf) will need to go via the related subsystems to avoid conflicts nightmare. The good thing is that these are userspace tools. They do not block removing pr_warning() from the internal kernel API.

Best Regards,
Petr

#46 lore raw

As I said before: please just send Linus a scripted conversion after the next -rc1. There is no point in creating all this churn.

maintainer
#47 lore raw

(Adding Stephen Rothwell)

Quoted 2 lines · Christoph Hellwig

As I said before: please just send Linus a scripted conversion after the next -rc1. There is no point in creating all this churn.

I again ask for a scripted mechanism to be added to -next to allow these types of scriptable patches to get compilation coverage testing.