linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/32] Kill pr_warning in the whole linux code
@ 2019-09-20  6:25 Kefeng Wang
  2019-09-20  6:25 ` [PATCH 01/32] alpha: Use pr_warn instead of pr_warning Kefeng Wang
                   ` (33 more replies)
  0 siblings, 34 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang

There are pr_warning and pr_warng to show WARNING level message,             
most of the code using pr_warn, number based on next-20190919,
                                                                             
pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)                    
                                                                             
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: 5730   pr_warning: 0                                                
                                                                             
Miscellanea:                                                                 
o Coalesce formats                                                           
o Realign arguments                                                          
o Remove unnecessary line continuations                                      

Kefeng Wang (32):
  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: Use pr_warn instead of pr_warning
  scsi: Use pr_warn instead of pr_warning
  sh/intc: Use pr_warn instead of pr_warning
  staging: 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             |  11 +-
 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/staging/isdn/gigaset/interface.c  |   2 +-
 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                  |  20 +-
 tools/lib/bpf/libbpf.c                    | 652 +++++++++++-----------
 tools/lib/bpf/libbpf_internal.h           |   2 +-
 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                   |  14 +-
 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            | 112 ++--
 tools/perf/util/record.c                  |  18 +-
 tools/perf/util/session.c                 |   2 +-
 tools/perf/util/srcline.c                 |   6 +-
 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, 882 insertions(+), 927 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 01/32] alpha: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 02/32] arm64: " Kefeng Wang
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.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: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/alpha/kernel/perf_event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c
index 4341ccf5c0c4..e7a59d927d78 100644
--- a/arch/alpha/kernel/perf_event.c
+++ b/arch/alpha/kernel/perf_event.c
@@ -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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 02/32] arm64: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
  2019-09-20  6:25 ` [PATCH 01/32] alpha: Use pr_warn instead of pr_warning Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20 15:57   ` Will Deacon
  2019-09-20  6:25 ` [PATCH 03/32] ia64: " Kefeng Wang
                   ` (31 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Will Deacon, Mark Rutland, Catalin Marinas

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: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/arm64/kernel/hw_breakpoint.c |  8 ++++----
 arch/arm64/kernel/smp.c           | 11 +++++------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index 38ee1514cd9c..0b727edf4104 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -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;
 	}
 }
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index dc9fe879c279..ab149bcc3dc7 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -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();
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 03/32] ia64: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
  2019-09-20  6:25 ` [PATCH 01/32] alpha: Use pr_warn instead of pr_warning Kefeng Wang
  2019-09-20  6:25 ` [PATCH 02/32] arm64: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 04/32] riscv: " Kefeng Wang
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Tony Luck, Fenghua Yu

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: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/ia64/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 8eb276aac5ce..2525058aba42 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -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",
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 04/32] riscv: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (2 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 03/32] ia64: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-25 21:05   ` Palmer Dabbelt
  2019-09-20  6:25 ` [PATCH 05/32] sh: " Kefeng Wang
                   ` (29 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Paul Walmsley, Palmer Dabbelt, Albert Ou

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: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/riscv/kernel/module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c
index 70bb94ae61c5..b7401858d872 100644
--- a/arch/riscv/kernel/module.c
+++ b/arch/riscv/kernel/module.c
@@ -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;
 		}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 05/32] sh: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (3 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 04/32] riscv: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 06/32] sparc: " Kefeng Wang
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Stephen Rothwell, Yoshinori Sato, Rich Felker

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 <sfr@canb.auug.org.au>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 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(-)

diff --git a/arch/sh/boards/mach-sdk7786/nmi.c b/arch/sh/boards/mach-sdk7786/nmi.c
index c2e09d798537..afba49679a12 100644
--- a/arch/sh/boards/mach-sdk7786/nmi.c
+++ b/arch/sh/boards/mach-sdk7786/nmi.c
@@ -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);
diff --git a/arch/sh/drivers/pci/fixups-sdk7786.c b/arch/sh/drivers/pci/fixups-sdk7786.c
index 8cbfa5310a4b..6972af7b4e93 100644
--- a/arch/sh/drivers/pci/fixups-sdk7786.c
+++ b/arch/sh/drivers/pci/fixups-sdk7786.c
@@ -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
diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c
index bacad6da4fe4..60c828a2b8a2 100644
--- a/arch/sh/kernel/io_trapped.c
+++ b/arch/sh/kernel/io_trapped.c
@@ -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);
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 2c0e0f37a318..6ef341f6cfee 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -354,7 +354,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;
 }
 
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 792f36129062..3169a343a5ab 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -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;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 06/32] sparc: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (4 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 05/32] sh: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 07/32] x86: " Kefeng Wang
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.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: "David S. Miller" <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/sparc/kernel/smp_64.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index a8275fea4b70..9b4506373353 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -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,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 07/32] x86: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (5 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 06/32] sparc: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  9:28   ` Robert Richter
  2019-09-20  6:25 ` [PATCH 08/32] acpi: " Kefeng Wang
                   ` (26 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Borislav Petkov, H. Peter Anvin, Robert Richter,
	Darren Hart, Andy Shevchenko

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 <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Robert Richter <rric@kernel.org>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/x86/kernel/amd_gart_64.c          | 11 ++++---
 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(+), 64 deletions(-)

diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c
index a585ea6f686a..53545c9c7cad 100644
--- a/arch/x86/kernel/amd_gart_64.c
+++ b/arch/x86/kernel/amd_gart_64.c
@@ -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,7 +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"
+	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU\n"
 	       "falling back to iommu=soft.\n");
 	return -1;
 }
@@ -730,8 +729,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;
 	}
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 9e2dd2b296cd..3570864b8329 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -780,8 +780,8 @@ calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc)
 
 	res = (((u64)deltapm) *  mult) >> 22;
 	do_div(res, 1000000);
-	pr_warning("APIC calibration not consistent "
-		   "with PM-Timer: %ldms instead of 100ms\n",(long)res);
+	pr_warn("APIC calibration not consistent "
+		"with PM-Timer: %ldms instead of 100ms\n", (long)res);
 
 	/* Correct the lapic counter value */
 	res = (((u64)(*delta)) * pm_100ms);
@@ -977,7 +977,7 @@ static int __init calibrate_APIC_clock(void)
 	 */
 	if (lapic_timer_period < (1000000 / HZ)) {
 		local_irq_enable();
-		pr_warning("APIC frequency too slow, disabling apic timer\n");
+		pr_warn("APIC frequency too slow, disabling apic timer\n");
 		return -1;
 	}
 
@@ -1021,7 +1021,7 @@ static int __init calibrate_APIC_clock(void)
 	local_irq_enable();
 
 	if (levt->features & CLOCK_EVT_FEAT_DUMMY) {
-		pr_warning("APIC timer disabled due to verification failure\n");
+		pr_warn("APIC timer disabled due to verification failure\n");
 		return -1;
 	}
 
@@ -1095,8 +1095,8 @@ static void local_apic_timer_interrupt(void)
 	 * spurious.
 	 */
 	if (!evt->event_handler) {
-		pr_warning("Spurious LAPIC timer interrupt on cpu %d\n",
-			   smp_processor_id());
+		pr_warn("Spurious LAPIC timer interrupt on cpu %d\n",
+			smp_processor_id());
 		/* Switch it off */
 		lapic_timer_shutdown(evt);
 		return;
@@ -1809,11 +1809,11 @@ static int __init setup_nox2apic(char *str)
 		int apicid = native_apic_msr_read(APIC_ID);
 
 		if (apicid >= 255) {
-			pr_warning("Apicid: %08x, cannot enforce nox2apic\n",
-				   apicid);
+			pr_warn("Apicid: %08x, cannot enforce nox2apic\n",
+				apicid);
 			return 0;
 		}
-		pr_warning("x2apic already enabled.\n");
+		pr_warn("x2apic already enabled.\n");
 		__x2apic_disable();
 	}
 	setup_clear_cpu_cap(X86_FEATURE_X2APIC);
@@ -1981,7 +1981,7 @@ static int __init apic_verify(void)
 	 */
 	features = cpuid_edx(1);
 	if (!(features & (1 << X86_FEATURE_APIC))) {
-		pr_warning("Could not enable APIC!\n");
+		pr_warn("Could not enable APIC!\n");
 		return -1;
 	}
 	set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
@@ -2408,9 +2408,8 @@ int generic_processor_info(int apicid, int version)
 	    disabled_cpu_apicid == apicid) {
 		int thiscpu = num_processors + disabled_cpus;
 
-		pr_warning("APIC: Disabling requested cpu."
-			   " Processor %d/0x%x ignored.\n",
-			   thiscpu, apicid);
+		pr_warn("APIC: Disabling requested cpu."
+			" Processor %d/0x%x ignored.\n", thiscpu, apicid);
 
 		disabled_cpus++;
 		return -ENODEV;
@@ -2424,8 +2423,7 @@ int generic_processor_info(int apicid, int version)
 	    apicid != boot_cpu_physical_apicid) {
 		int thiscpu = max + disabled_cpus - 1;
 
-		pr_warning(
-			"APIC: NR_CPUS/possible_cpus limit of %i almost"
+		pr_warn("APIC: NR_CPUS/possible_cpus limit of %i almost"
 			" reached. Keeping one slot for boot cpu."
 			"  Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
 
@@ -2436,9 +2434,8 @@ int generic_processor_info(int apicid, int version)
 	if (num_processors >= nr_cpu_ids) {
 		int thiscpu = max + disabled_cpus;
 
-		pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
-			   "reached. Processor %d/0x%x ignored.\n",
-			   max, thiscpu, apicid);
+		pr_warn("APIC: NR_CPUS/possible_cpus limit of %i reached. "
+			"Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
 
 		disabled_cpus++;
 		return -EINVAL;
@@ -2468,13 +2465,13 @@ int generic_processor_info(int apicid, int version)
 	 * Validate version
 	 */
 	if (version == 0x0) {
-		pr_warning("BIOS bug: APIC version is 0 for CPU %d/0x%x, fixing up to 0x10\n",
-			   cpu, apicid);
+		pr_warn("BIOS bug: APIC version is 0 for CPU %d/0x%x, fixing up to 0x10\n",
+			cpu, apicid);
 		version = 0x10;
 	}
 
 	if (version != boot_cpu_apic_version) {
-		pr_warning("BIOS bug: APIC version mismatch, boot CPU: %x, CPU %d: version %x\n",
+		pr_warn("BIOS bug: APIC version mismatch, boot CPU: %x, CPU %d: version %x\n",
 			boot_cpu_apic_version, cpu, version);
 	}
 
@@ -2843,7 +2840,7 @@ static int __init apic_set_verbosity(char *arg)
 		apic_verbosity = APIC_VERBOSE;
 #ifdef CONFIG_X86_64
 	else {
-		pr_warning("APIC Verbosity level %s not recognised"
+		pr_warn("APIC Verbosity level %s not recognised"
 			" use apic=verbose or apic=debug\n", arg);
 		return -EINVAL;
 	}
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 86663874ef04..e6d7894ad127 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -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,
diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index a49fe1dcb47e..4c61f0713832 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -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
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index ec534f978867..b8acf639abd1 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -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");
 	}
 
diff --git a/arch/x86/kernel/umip.c b/arch/x86/kernel/umip.c
index 548fefed71ee..b4a304893189 100644
--- a/arch/x86/kernel/umip.c
+++ b/arch/x86/kernel/umip.c
@@ -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)))
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 79eb55ce69a9..49d7814b59a9 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -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;
 	}
 
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index b8ef8557d4b3..673de6063345 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -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)
diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c
index abffa0be80da..7f1d2034df1e 100644
--- a/arch/x86/mm/numa_emulation.c
+++ b/arch/x86/mm/numa_emulation.c
@@ -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);
diff --git a/arch/x86/mm/testmmiotrace.c b/arch/x86/mm/testmmiotrace.c
index 0881e1ff1e58..afd828a57c33 100644
--- a/arch/x86/mm/testmmiotrace.c
+++ b/arch/x86/mm/testmmiotrace.c
@@ -122,9 +122,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");
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h
index 71e8a67337e2..276cf79b5d24 100644
--- a/arch/x86/oprofile/op_x86_model.h
+++ b/arch/x86/oprofile/op_x86_model.h
@@ -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,
diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c
index 6d193bb36021..089413cd944e 100644
--- a/arch/x86/platform/olpc/olpc-xo15-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo15-sci.c
@@ -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;
 	}
 
diff --git a/arch/x86/platform/sfi/sfi.c b/arch/x86/platform/sfi/sfi.c
index bf6016f8db4e..6259563760f9 100644
--- a/arch/x86/platform/sfi/sfi.c
+++ b/arch/x86/platform/sfi/sfi.c
@@ -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;
 	}
 
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 548d1e0a5ba1..33b0e20df7fc 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 08/32] acpi: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (6 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 07/32] x86: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 09/32] drbd: " Kefeng Wang
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Rafael J. Wysocki, Len Brown, James Morse

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: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: James Morse <james.morse@arm.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 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(-)

diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index 131c35ee9ed3..1bb2a94f49a3 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -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;
 	}
 
diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index e430cf4caec2..086373f8ccb1 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -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;
 	}
 
diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c
index d0f3a46716e9..c740f0faad39 100644
--- a/drivers/acpi/apei/erst-dbg.c
+++ b/drivers/acpi/apei/erst-dbg.c
@@ -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;
 	}
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 777f6f7122b4..8906c80175e6 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -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);
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 267bdbf6a7bf..822402480f7d 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -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;
 		}
 	}
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 558fedf8a7a1..8f0e0c8d8c3d 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -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);
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 2a3e392751e0..3b4448972374 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -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;
 		}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 09/32] drbd: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (7 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 08/32] acpi: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 10/32] gdrom: " Kefeng Wang
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Philipp Reisner, Lars Ellenberg, Jens Axboe, drbd-dev

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: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/block/drbd/drbd_nl.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 5d52a2d32155..de2f94d0103a 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 10/32] gdrom: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (8 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 09/32] drbd: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 11/32] clocksource: samsung_pwm_timer: " Kefeng Wang
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Jens Axboe

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: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/cdrom/gdrom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 6626c84f66d1..5b21dc421c94 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -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;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 11/32] clocksource: samsung_pwm_timer: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (9 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 10/32] gdrom: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  8:25   ` Daniel Lezcano
  2019-09-20  6:25 ` [PATCH 12/32] crypto: n2: " Kefeng Wang
                   ` (22 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Daniel Lezcano

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: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/clocksource/samsung_pwm_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index 895f53eb5771..0274219e1720 100644
--- a/drivers/clocksource/samsung_pwm_timer.c
+++ b/drivers/clocksource/samsung_pwm_timer.c
@@ -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;
 		}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 12/32] crypto: n2: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (10 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 11/32] clocksource: samsung_pwm_timer: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 13/32] ide: " Kefeng Wang
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Herbert Xu

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: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/crypto/n2_core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index dc15b06e96ab..40b81013213e 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 13/32] ide: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (11 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 12/32] crypto: n2: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 14/32] idsn: " Kefeng Wang
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.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: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/ide/tx4938ide.c | 2 +-
 drivers/ide/tx4939ide.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index 40a3f55b08dd..962eb92501b5 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -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",
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 88d132edc4e3..d5e871fe840d 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 14/32] idsn: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (12 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 13/32] ide: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 15/32] macintosh: " Kefeng Wang
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Karsten Keil

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: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 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(-)

diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
index 1137dd152b5c..ecc1ef6c386d 100644
--- a/drivers/isdn/hardware/mISDN/avmfritz.c
+++ b/drivers/isdn/hardware/mISDN/avmfritz.c
@@ -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;
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 86669ec8b977..7013a3f08429 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -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;
 			}
 		}
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 2330a7d24267..abdf787c1a71 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -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)
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index 008a74a1ed44..621364bb6b12 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -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;
 		}
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
index bca880213e91..ec475087fbf9 100644
--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
+++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
@@ -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);
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c
index 4a3e748a1c26..096d8c5e5df9 100644
--- a/drivers/isdn/hardware/mISDN/mISDNisar.c
+++ b/drivers/isdn/hardware/mISDN/mISDNisar.c
@@ -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;
 		}
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index 61caa7e50b9a..6aae97e827b7 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -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) {
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index bad55fdacd36..f3b8db7b48fe 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -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
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c
index f378173bcf6f..8c93af06ed02 100644
--- a/drivers/isdn/mISDN/hwchannel.c
+++ b/drivers/isdn/mISDN/hwchannel.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 15/32] macintosh: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (13 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 14/32] idsn: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 16/32] of: " Kefeng Wang
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Benjamin Herrenschmidt, linuxppc-dev

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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 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(-)

diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index 3c971297b6dc..67daeec94b44 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -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);
diff --git a/drivers/macintosh/windfarm_lm87_sensor.c b/drivers/macintosh/windfarm_lm87_sensor.c
index e44525b19071..b03a33b803b7 100644
--- a/drivers/macintosh/windfarm_lm87_sensor.c
+++ b/drivers/macintosh/windfarm_lm87_sensor.c
@@ -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;
 	}
 
diff --git a/drivers/macintosh/windfarm_pm72.c b/drivers/macintosh/windfarm_pm72.c
index c5da0fc24884..e81746b87cff 100644
--- a/drivers/macintosh/windfarm_pm72.c
+++ b/drivers/macintosh/windfarm_pm72.c
@@ -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;
diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c
index 8456eb67184b..7acd1684c451 100644
--- a/drivers/macintosh/windfarm_rm31.c
+++ b/drivers/macintosh/windfarm_rm31.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 16/32] of: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (14 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 15/32] macintosh: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 17/32] oprofile: " Kefeng Wang
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Rob Herring, Frank Rowand

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: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/of/fdt.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 223d617ecfe1..f1c23aad951e 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 17/32] oprofile: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (15 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 16/32] of: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  9:18   ` Robert Richter
  2019-09-20  6:25 ` [PATCH 18/32] platform/x86: " Kefeng Wang
                   ` (16 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Robert Richter

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: Robert Richter <rric@kernel.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/oprofile/oprofile_perf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index 4b150a754890..98a63a5f8763 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -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;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 18/32] platform/x86: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (16 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 17/32] oprofile: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:26   ` Andy Shevchenko
  2019-09-20  6:25 ` [PATCH 19/32] scsi: " Kefeng Wang
                   ` (15 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Corentin Chary, Darren Hart, Andy Shevchenko

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 <corentin.chary@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/platform/x86/asus-laptop.c    |  2 +-
 drivers/platform/x86/eeepc-laptop.c   |  2 +-
 drivers/platform/x86/intel_oaktrail.c | 10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 472af7edf0af..ca65e1039f92 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -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;
 }
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index f3f74a9c109e..776868d5e458 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -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;
 	}
 
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
index 3c0438ba385e..1a09a75bd16d 100644
--- a/drivers/platform/x86/intel_oaktrail.c
+++ b/drivers/platform/x86/intel_oaktrail.c
@@ -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


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 19/32] scsi: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (17 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 18/32] platform/x86: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 20/32] sh/intc: " Kefeng Wang
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, James E.J. Bottomley, Martin K. Petersen

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" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/scsi/a3000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c
index 222c77c9621f..b6a0432f305a 100644
--- a/drivers/scsi/a3000.c
+++ b/drivers/scsi/a3000.c
@@ -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;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 20/32] sh/intc: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (18 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 19/32] scsi: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 21/32] staging: " Kefeng Wang
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Yoshinori Sato, Rich Felker

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: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/sh/intc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 46f0f322d4d8..8485e812d9b2 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 21/32] staging: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (19 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 20/32] sh/intc: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 22/32] fs: afs: " Kefeng Wang
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Karsten Keil

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: Karsten Keil <isdn@linux-pingi.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/staging/isdn/gigaset/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/isdn/gigaset/interface.c b/drivers/staging/isdn/gigaset/interface.c
index 17fa615a8c68..9ddadd07e707 100644
--- a/drivers/staging/isdn/gigaset/interface.c
+++ b/drivers/staging/isdn/gigaset/interface.c
@@ -518,7 +518,7 @@ void gigaset_if_init(struct cardstate *cs)
 	if (!IS_ERR(cs->tty_dev))
 		dev_set_drvdata(cs->tty_dev, cs);
 	else {
-		pr_warning("could not register device to the tty subsystem\n");
+		pr_warn("could not register device to the tty subsystem\n");
 		cs->tty_dev = NULL;
 	}
 	mutex_unlock(&cs->mutex);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 22/32] fs: afs: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (20 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 21/32] staging: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 23/32] vgacon: " Kefeng Wang
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, David Howells, linux-afs

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: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 fs/afs/flock.c     |  4 ++--
 fs/afs/inode.c     | 13 ++++++-------
 fs/afs/yfsclient.c |  4 ++--
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/fs/afs/flock.c b/fs/afs/flock.c
index d5e5a6ddc847..0f2a94ba73cb 100644
--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -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);
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 7b1c18c32f48..4dd7a0ca4360 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -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;
 	}
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index 3ee7abf4b2d0..9ac035c17dc4 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -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);
 }
 
 /*
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 23/32] vgacon: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (21 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 22/32] fs: afs: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 24/32] dma-debug: " Kefeng Wang
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Bartlomiej Zolnierkiewicz, linux-fbdev

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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/video/console/vgacon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index c6b3bdbbdbc9..de7b8382aba9 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -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;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 24/32] dma-debug: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (22 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 23/32] vgacon: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-25 17:13   ` Christoph Hellwig
  2019-09-20  6:25 ` [PATCH 25/32] trace: " Kefeng Wang
                   ` (9 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Christoph Hellwig, Marek Szyprowski, Robin Murphy

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 <hch@lst.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 kernel/dma/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index 099002d84f46..a26170469543 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -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
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 25/32] trace: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (23 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 24/32] dma-debug: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20 13:26   ` Steven Rostedt
  2019-09-20  6:25 ` [PATCH 26/32] lib: cpu_rmap: " Kefeng Wang
                   ` (8 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Steven Rostedt

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: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 kernel/trace/trace_benchmark.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_benchmark.c b/kernel/trace/trace_benchmark.c
index 80e0b2aca703..2e9a4746ea85 100644
--- a/kernel/trace/trace_benchmark.c
+++ b/kernel/trace/trace_benchmark.c
@@ -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);
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 26/32] lib: cpu_rmap: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (24 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 25/32] trace: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 27/32] ASoC: samsung: " Kefeng Wang
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 lib/cpu_rmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cpu_rmap.c b/lib/cpu_rmap.c
index 075f3788bbe4..f08d9c56f712 100644
--- a/lib/cpu_rmap.c
+++ b/lib/cpu_rmap.c
@@ -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);
 }
 
 /**
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 27/32] ASoC: samsung: Use pr_warn instead of pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (25 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 26/32] lib: cpu_rmap: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 28/32] printk: Drop pr_warning Kefeng Wang
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Jaroslav Kysela, Takashi Iwai

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 <krzk@kernel.org>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 sound/soc/samsung/s3c-i2s-v2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 7e196b599be1..593be1b668d6 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 28/32] printk: Drop pr_warning
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (26 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 27/32] ASoC: samsung: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 29/32] tools lib api: Renaming pr_warning to pr_warn Kefeng Wang
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Steven Rostedt

With all pr_warning are removed, saftely drop pr_warning definition.

Cc: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 include/linux/printk.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/printk.h b/include/linux/printk.h
index cefd374c47b1..7071b9948756 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -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, ...) \
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 29/32] tools lib api: Renaming pr_warning to pr_warn
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (27 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 28/32] printk: Drop pr_warning Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 30/32] tools lib bpf: " Kefeng Wang
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.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.

Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 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(-)

diff --git a/tools/lib/api/debug-internal.h b/tools/lib/api/debug-internal.h
index 80c783497d25..5a5820c11db8 100644
--- a/tools/lib/api/debug-internal.h
+++ b/tools/lib/api/debug-internal.h
@@ -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__)
 
diff --git a/tools/lib/api/debug.c b/tools/lib/api/debug.c
index 69b1ba3d1ee3..7708f0558e8c 100644
--- a/tools/lib/api/debug.c
+++ b/tools/lib/api/debug.c
@@ -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;
 }
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
index 7aba8243a0e7..11b3885e833e 100644
--- a/tools/lib/api/fs/fs.c
+++ b/tools/lib/api/fs/fs.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 30/32] tools lib bpf: Renaming pr_warning to pr_warn
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (28 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 29/32] tools lib api: Renaming pr_warning to pr_warn Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-22 21:07   ` Andrii Nakryiko
  2019-09-20  6:25 ` [PATCH 31/32] tools perf: " Kefeng Wang
                   ` (3 subsequent siblings)
  33 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Martin KaFai Lau, Song Liu, Yonghong Song, bpf

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.

Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: bpf@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 tools/lib/bpf/btf.c             |  56 +--
 tools/lib/bpf/btf_dump.c        |  20 +-
 tools/lib/bpf/libbpf.c          | 652 ++++++++++++++++----------------
 tools/lib/bpf/libbpf_internal.h |   2 +-
 tools/lib/bpf/xsk.c             |   4 +-
 5 files changed, 363 insertions(+), 371 deletions(-)

diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index 1aa189a9112a..801dac6f493d 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -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;
 	}
 
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c
index 715967762312..81793ab4b6a1 100644
--- a/tools/lib/bpf/btf_dump.c
+++ b/tools/lib/bpf/btf_dump.c
@@ -347,7 +347,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;
 	}
 
@@ -537,7 +537,7 @@ static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id)
 	kind = btf_kind(t);
 
 	if (top_level_def && t->name_off == 0) {
-		pr_warning("unexpected nameless definition, id:[%u]\n", id);
+		pr_warn("unexpected nameless definition, id:[%u]\n", id);
 		return;
 	}
 
@@ -555,8 +555,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);
@@ -701,7 +701,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;
 	}
 }
@@ -969,7 +969,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;
 		}
@@ -998,8 +998,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;
 		}
 	}
@@ -1224,8 +1224,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;
 		}
 
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index e0276520171b..cfec30390603 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -310,8 +310,8 @@ void bpf_program__unload(struct bpf_program *prog)
 		for (i = 0; i < prog->instances.nr; i++)
 			zclose(prog->instances.fds[i]);
 	} else if (prog->instances.nr != -1) {
-		pr_warning("Internal error: instances.nr is %d\n",
-			   prog->instances.nr);
+		pr_warn("Internal error: instances.nr is %d\n",
+			prog->instances.nr);
 	}
 
 	prog->instances.nr = -1;
@@ -362,8 +362,8 @@ bpf_program__init(void *data, size_t size, char *section_name, int idx,
 	const size_t bpf_insn_sz = sizeof(struct bpf_insn);
 
 	if (size == 0 || size % bpf_insn_sz) {
-		pr_warning("corrupted section '%s', size: %zu\n",
-			   section_name, size);
+		pr_warn("corrupted section '%s', size: %zu\n",
+			section_name, size);
 		return -EINVAL;
 	}
 
@@ -371,22 +371,22 @@ bpf_program__init(void *data, size_t size, char *section_name, int idx,
 
 	prog->section_name = strdup(section_name);
 	if (!prog->section_name) {
-		pr_warning("failed to alloc name for prog under section(%d) %s\n",
-			   idx, section_name);
+		pr_warn("failed to alloc name for prog under section(%d) %s\n",
+			idx, section_name);
 		goto errout;
 	}
 
 	prog->pin_name = __bpf_program__pin_name(prog);
 	if (!prog->pin_name) {
-		pr_warning("failed to alloc pin name for prog under section(%d) %s\n",
-			   idx, section_name);
+		pr_warn("failed to alloc pin name for prog under section(%d) %s\n",
+			idx, section_name);
 		goto errout;
 	}
 
 	prog->insns = malloc(size);
 	if (!prog->insns) {
-		pr_warning("failed to alloc insns for prog under section %s\n",
-			   section_name);
+		pr_warn("failed to alloc insns for prog under section %s\n",
+			section_name);
 		goto errout;
 	}
 	prog->insns_cnt = size / bpf_insn_sz;
@@ -424,8 +424,8 @@ bpf_object__add_program(struct bpf_object *obj, void *data, size_t size,
 		 * is still valid, so don't need special treat for
 		 * bpf_close_object().
 		 */
-		pr_warning("failed to alloc a new program under section '%s'\n",
-			   section_name);
+		pr_warn("failed to alloc a new program under section '%s'\n",
+			section_name);
 		bpf_program__exit(&prog);
 		return -ENOMEM;
 	}
@@ -465,8 +465,8 @@ bpf_object__init_prog_names(struct bpf_object *obj)
 					  obj->efile.strtabidx,
 					  sym.st_name);
 			if (!name) {
-				pr_warning("failed to get sym name string for prog %s\n",
-					   prog->section_name);
+				pr_warn("failed to get sym name string for prog %s\n",
+					prog->section_name);
 				return -LIBBPF_ERRNO__LIBELF;
 			}
 		}
@@ -475,15 +475,15 @@ bpf_object__init_prog_names(struct bpf_object *obj)
 			name = ".text";
 
 		if (!name) {
-			pr_warning("failed to find sym for prog %s\n",
-				   prog->section_name);
+			pr_warn("failed to find sym for prog %s\n",
+				prog->section_name);
 			return -EINVAL;
 		}
 
 		prog->name = strdup(name);
 		if (!prog->name) {
-			pr_warning("failed to allocate memory for prog sym %s\n",
-				   name);
+			pr_warn("failed to allocate memory for prog sym %s\n",
+				name);
 			return -ENOMEM;
 		}
 	}
@@ -500,7 +500,7 @@ static struct bpf_object *bpf_object__new(const char *path,
 
 	obj = calloc(1, sizeof(struct bpf_object) + strlen(path) + 1);
 	if (!obj) {
-		pr_warning("alloc memory failed for %s\n", path);
+		pr_warn("alloc memory failed for %s\n", path);
 		return ERR_PTR(-ENOMEM);
 	}
 
@@ -560,7 +560,7 @@ static int bpf_object__elf_init(struct bpf_object *obj)
 	GElf_Ehdr *ep;
 
 	if (obj_elf_valid(obj)) {
-		pr_warning("elf init: internal error\n");
+		pr_warn("elf init: internal error\n");
 		return -LIBBPF_ERRNO__LIBELF;
 	}
 
@@ -578,7 +578,7 @@ static int bpf_object__elf_init(struct bpf_object *obj)
 
 			err = -errno;
 			cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg));
-			pr_warning("failed to open %s: %s\n", obj->path, cp);
+			pr_warn("failed to open %s: %s\n", obj->path, cp);
 			return err;
 		}
 
@@ -587,13 +587,13 @@ static int bpf_object__elf_init(struct bpf_object *obj)
 	}
 
 	if (!obj->efile.elf) {
-		pr_warning("failed to open %s as ELF file\n", obj->path);
+		pr_warn("failed to open %s as ELF file\n", obj->path);
 		err = -LIBBPF_ERRNO__LIBELF;
 		goto errout;
 	}
 
 	if (!gelf_getehdr(obj->efile.elf, &obj->efile.ehdr)) {
-		pr_warning("failed to get EHDR from %s\n", obj->path);
+		pr_warn("failed to get EHDR from %s\n", obj->path);
 		err = -LIBBPF_ERRNO__FORMAT;
 		goto errout;
 	}
@@ -602,7 +602,7 @@ static int bpf_object__elf_init(struct bpf_object *obj)
 	/* Old LLVM set e_machine to EM_NONE */
 	if (ep->e_type != ET_REL ||
 	    (ep->e_machine && ep->e_machine != EM_BPF)) {
-		pr_warning("%s is not an eBPF object file\n", obj->path);
+		pr_warn("%s is not an eBPF object file\n", obj->path);
 		err = -LIBBPF_ERRNO__FORMAT;
 		goto errout;
 	}
@@ -624,7 +624,7 @@ static int bpf_object__check_endianness(struct bpf_object *obj)
 #else
 # error "Unrecognized __BYTE_ORDER__"
 #endif
-	pr_warning("endianness mismatch.\n");
+	pr_warn("endianness mismatch.\n");
 	return -LIBBPF_ERRNO__ENDIAN;
 }
 
@@ -642,7 +642,7 @@ bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size)
 	__u32 kver;
 
 	if (size != sizeof(kver)) {
-		pr_warning("invalid kver section in %s\n", obj->path);
+		pr_warn("invalid kver section in %s\n", obj->path);
 		return -LIBBPF_ERRNO__FORMAT;
 	}
 	memcpy(&kver, data, sizeof(kver));
@@ -684,15 +684,15 @@ static int bpf_object_search_section_size(const struct bpf_object *obj,
 
 		idx++;
 		if (gelf_getshdr(scn, &sh) != &sh) {
-			pr_warning("failed to get section(%d) header from %s\n",
-				   idx, obj->path);
+			pr_warn("failed to get section(%d) header from %s\n",
+				idx, obj->path);
 			return -EIO;
 		}
 
 		sec_name = elf_strptr(elf, ep->e_shstrndx, sh.sh_name);
 		if (!sec_name) {
-			pr_warning("failed to get section(%d) name from %s\n",
-				   idx, obj->path);
+			pr_warn("failed to get section(%d) name from %s\n",
+				idx, obj->path);
 			return -EIO;
 		}
 
@@ -701,8 +701,8 @@ static int bpf_object_search_section_size(const struct bpf_object *obj,
 
 		data = elf_getdata(scn, 0);
 		if (!data) {
-			pr_warning("failed to get section(%d) data from %s(%s)\n",
-				   idx, name, obj->path);
+			pr_warn("failed to get section(%d) data from %s(%s)\n",
+				idx, name, obj->path);
 			return -EIO;
 		}
 
@@ -762,8 +762,8 @@ int bpf_object__variable_offset(const struct bpf_object *obj, const char *name,
 		sname = elf_strptr(obj->efile.elf, obj->efile.strtabidx,
 				   sym.st_name);
 		if (!sname) {
-			pr_warning("failed to get sym name string for var %s\n",
-				   name);
+			pr_warn("failed to get sym name string for var %s\n",
+				name);
 			return -EIO;
 		}
 		if (strcmp(name, sname) == 0) {
@@ -787,7 +787,7 @@ static struct bpf_map *bpf_object__add_map(struct bpf_object *obj)
 	new_cap = max((size_t)4, obj->maps_cap * 3 / 2);
 	new_maps = realloc(obj->maps, new_cap * sizeof(*obj->maps));
 	if (!new_maps) {
-		pr_warning("alloc maps for object failed\n");
+		pr_warn("alloc maps for object failed\n");
 		return ERR_PTR(-ENOMEM);
 	}
 
@@ -828,7 +828,7 @@ bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type,
 		 libbpf_type_to_btf_name[type]);
 	map->name = strdup(map_name);
 	if (!map->name) {
-		pr_warning("failed to alloc map name\n");
+		pr_warn("failed to alloc map name\n");
 		return -ENOMEM;
 	}
 	pr_debug("map '%s' (global data): at sec_idx %d, offset %zu.\n",
@@ -844,7 +844,7 @@ bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type,
 		*data_buff = malloc(data->d_size);
 		if (!*data_buff) {
 			zfree(&map->name);
-			pr_warning("failed to alloc map content buffer\n");
+			pr_warn("failed to alloc map content buffer\n");
 			return -ENOMEM;
 		}
 		memcpy(*data_buff, data->d_buf, data->d_size);
@@ -906,8 +906,8 @@ static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict)
 	if (scn)
 		data = elf_getdata(scn, NULL);
 	if (!scn || !data) {
-		pr_warning("failed to get Elf_Data from map section %d\n",
-			   obj->efile.maps_shndx);
+		pr_warn("failed to get Elf_Data from map section %d\n",
+			obj->efile.maps_shndx);
 		return -EINVAL;
 	}
 
@@ -934,9 +934,9 @@ static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict)
 
 	map_def_sz = data->d_size / nr_maps;
 	if (!data->d_size || (data->d_size % nr_maps) != 0) {
-		pr_warning("unable to determine map definition size "
-			   "section %s, %d maps in %zd bytes\n",
-			   obj->path, nr_maps, data->d_size);
+		pr_warn("unable to determine map definition size "
+			"section %s, %d maps in %zd bytes\n",
+			obj->path, nr_maps, data->d_size);
 		return -EINVAL;
 	}
 
@@ -959,8 +959,8 @@ static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict)
 		map_name = elf_strptr(obj->efile.elf, obj->efile.strtabidx,
 				      sym.st_name);
 		if (!map_name) {
-			pr_warning("failed to get map #%d name sym string for obj %s\n",
-				   i, obj->path);
+			pr_warn("failed to get map #%d name sym string for obj %s\n",
+				i, obj->path);
 			return -LIBBPF_ERRNO__FORMAT;
 		}
 
@@ -970,14 +970,14 @@ static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict)
 		pr_debug("map '%s' (legacy): at sec_idx %d, offset %zu.\n",
 			 map_name, map->sec_idx, map->sec_offset);
 		if (sym.st_value + map_def_sz > data->d_size) {
-			pr_warning("corrupted maps section in %s: last map \"%s\" too small\n",
-				   obj->path, map_name);
+			pr_warn("corrupted maps section in %s: last map \"%s\" too small\n",
+				obj->path, map_name);
 			return -EINVAL;
 		}
 
 		map->name = strdup(map_name);
 		if (!map->name) {
-			pr_warning("failed to alloc map name\n");
+			pr_warn("failed to alloc map name\n");
 			return -ENOMEM;
 		}
 		pr_debug("map %d is \"%s\"\n", i, map->name);
@@ -1001,10 +1001,10 @@ static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict)
 			for (b = ((char *)def) + sizeof(struct bpf_map_def);
 			     b < ((char *)def) + map_def_sz; b++) {
 				if (*b != 0) {
-					pr_warning("maps section in %s: \"%s\" "
-						   "has unrecognized, non-zero "
-						   "options\n",
-						   obj->path, map_name);
+					pr_warn("maps section in %s: \"%s\" "
+						"has unrecognized, non-zero "
+						"options\n",
+						obj->path, map_name);
 					if (strict)
 						return -EINVAL;
 				}
@@ -1048,20 +1048,20 @@ static bool get_map_field_int(const char *map_name, const struct btf *btf,
 	const struct btf_type *arr_t;
 
 	if (!btf_is_ptr(t)) {
-		pr_warning("map '%s': attr '%s': expected PTR, got %u.\n",
-			   map_name, name, btf_kind(t));
+		pr_warn("map '%s': attr '%s': expected PTR, got %u.\n",
+			map_name, name, btf_kind(t));
 		return false;
 	}
 
 	arr_t = btf__type_by_id(btf, t->type);
 	if (!arr_t) {
-		pr_warning("map '%s': attr '%s': type [%u] not found.\n",
-			   map_name, name, t->type);
+		pr_warn("map '%s': attr '%s': type [%u] not found.\n",
+			map_name, name, t->type);
 		return false;
 	}
 	if (!btf_is_array(arr_t)) {
-		pr_warning("map '%s': attr '%s': expected ARRAY, got %u.\n",
-			   map_name, name, btf_kind(arr_t));
+		pr_warn("map '%s': attr '%s': expected ARRAY, got %u.\n",
+			map_name, name, btf_kind(arr_t));
 		return false;
 	}
 	arr_info = btf_array(arr_t);
@@ -1089,33 +1089,33 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 	vlen = btf_vlen(var);
 
 	if (map_name == NULL || map_name[0] == '\0') {
-		pr_warning("map #%d: empty name.\n", var_idx);
+		pr_warn("map #%d: empty name.\n", var_idx);
 		return -EINVAL;
 	}
 	if ((__u64)vi->offset + vi->size > data->d_size) {
-		pr_warning("map '%s' BTF data is corrupted.\n", map_name);
+		pr_warn("map '%s' BTF data is corrupted.\n", map_name);
 		return -EINVAL;
 	}
 	if (!btf_is_var(var)) {
-		pr_warning("map '%s': unexpected var kind %u.\n",
-			   map_name, btf_kind(var));
+		pr_warn("map '%s': unexpected var kind %u.\n",
+			map_name, btf_kind(var));
 		return -EINVAL;
 	}
 	if (var_extra->linkage != BTF_VAR_GLOBAL_ALLOCATED &&
 	    var_extra->linkage != BTF_VAR_STATIC) {
-		pr_warning("map '%s': unsupported var linkage %u.\n",
-			   map_name, var_extra->linkage);
+		pr_warn("map '%s': unsupported var linkage %u.\n",
+			map_name, var_extra->linkage);
 		return -EOPNOTSUPP;
 	}
 
 	def = skip_mods_and_typedefs(obj->btf, var->type, NULL);
 	if (!btf_is_struct(def)) {
-		pr_warning("map '%s': unexpected def kind %u.\n",
-			   map_name, btf_kind(var));
+		pr_warn("map '%s': unexpected def kind %u.\n",
+			map_name, btf_kind(var));
 		return -EINVAL;
 	}
 	if (def->size > vi->size) {
-		pr_warning("map '%s': invalid def size.\n", map_name);
+		pr_warn("map '%s': invalid def size.\n", map_name);
 		return -EINVAL;
 	}
 
@@ -1124,7 +1124,7 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 		return PTR_ERR(map);
 	map->name = strdup(map_name);
 	if (!map->name) {
-		pr_warning("map '%s': failed to alloc map name.\n", map_name);
+		pr_warn("map '%s': failed to alloc map name.\n", map_name);
 		return -ENOMEM;
 	}
 	map->libbpf_type = LIBBPF_MAP_UNSPEC;
@@ -1140,8 +1140,7 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 		const char *name = btf__name_by_offset(obj->btf, m->name_off);
 
 		if (!name) {
-			pr_warning("map '%s': invalid field #%d.\n",
-				   map_name, i);
+			pr_warn("map '%s': invalid field #%d.\n", map_name, i);
 			return -EINVAL;
 		}
 		if (strcmp(name, "type") == 0) {
@@ -1171,8 +1170,8 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 			pr_debug("map '%s': found key_size = %u.\n",
 				 map_name, sz);
 			if (map->def.key_size && map->def.key_size != sz) {
-				pr_warning("map '%s': conflicting key size %u != %u.\n",
-					   map_name, map->def.key_size, sz);
+				pr_warn("map '%s': conflicting key size %u != %u.\n",
+					map_name, map->def.key_size, sz);
 				return -EINVAL;
 			}
 			map->def.key_size = sz;
@@ -1181,26 +1180,26 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 
 			t = btf__type_by_id(obj->btf, m->type);
 			if (!t) {
-				pr_warning("map '%s': key type [%d] not found.\n",
-					   map_name, m->type);
+				pr_warn("map '%s': key type [%d] not found.\n",
+					map_name, m->type);
 				return -EINVAL;
 			}
 			if (!btf_is_ptr(t)) {
-				pr_warning("map '%s': key spec is not PTR: %u.\n",
-					   map_name, btf_kind(t));
+				pr_warn("map '%s': key spec is not PTR: %u.\n",
+					map_name, btf_kind(t));
 				return -EINVAL;
 			}
 			sz = btf__resolve_size(obj->btf, t->type);
 			if (sz < 0) {
-				pr_warning("map '%s': can't determine key size for type [%u]: %lld.\n",
-					   map_name, t->type, sz);
+				pr_warn("map '%s': can't determine key size for type [%u]: %lld.\n",
+					map_name, t->type, sz);
 				return sz;
 			}
 			pr_debug("map '%s': found key [%u], sz = %lld.\n",
 				 map_name, t->type, sz);
 			if (map->def.key_size && map->def.key_size != sz) {
-				pr_warning("map '%s': conflicting key size %u != %lld.\n",
-					   map_name, map->def.key_size, sz);
+				pr_warn("map '%s': conflicting key size %u != %lld.\n",
+					map_name, map->def.key_size, sz);
 				return -EINVAL;
 			}
 			map->def.key_size = sz;
@@ -1214,8 +1213,8 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 			pr_debug("map '%s': found value_size = %u.\n",
 				 map_name, sz);
 			if (map->def.value_size && map->def.value_size != sz) {
-				pr_warning("map '%s': conflicting value size %u != %u.\n",
-					   map_name, map->def.value_size, sz);
+				pr_warn("map '%s': conflicting value size %u != %u.\n",
+					map_name, map->def.value_size, sz);
 				return -EINVAL;
 			}
 			map->def.value_size = sz;
@@ -1224,34 +1223,34 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 
 			t = btf__type_by_id(obj->btf, m->type);
 			if (!t) {
-				pr_warning("map '%s': value type [%d] not found.\n",
-					   map_name, m->type);
+				pr_warn("map '%s': value type [%d] not found.\n",
+					map_name, m->type);
 				return -EINVAL;
 			}
 			if (!btf_is_ptr(t)) {
-				pr_warning("map '%s': value spec is not PTR: %u.\n",
+				pr_warn("map '%s': value spec is not PTR: %u.\n",
 					   map_name, btf_kind(t));
 				return -EINVAL;
 			}
 			sz = btf__resolve_size(obj->btf, t->type);
 			if (sz < 0) {
-				pr_warning("map '%s': can't determine value size for type [%u]: %lld.\n",
-					   map_name, t->type, sz);
+				pr_warn("map '%s': can't determine value size for type [%u]: %lld.\n",
+					map_name, t->type, sz);
 				return sz;
 			}
 			pr_debug("map '%s': found value [%u], sz = %lld.\n",
 				 map_name, t->type, sz);
 			if (map->def.value_size && map->def.value_size != sz) {
-				pr_warning("map '%s': conflicting value size %u != %lld.\n",
-					   map_name, map->def.value_size, sz);
+				pr_warn("map '%s': conflicting value size %u != %lld.\n",
+					map_name, map->def.value_size, sz);
 				return -EINVAL;
 			}
 			map->def.value_size = sz;
 			map->btf_value_type_id = t->type;
 		} else {
 			if (strict) {
-				pr_warning("map '%s': unknown field '%s'.\n",
-					   map_name, name);
+				pr_warn("map '%s': unknown field '%s'.\n",
+					map_name, name);
 				return -ENOTSUP;
 			}
 			pr_debug("map '%s': ignoring unknown field '%s'.\n",
@@ -1260,7 +1259,7 @@ static int bpf_object__init_user_btf_map(struct bpf_object *obj,
 	}
 
 	if (map->def.type == BPF_MAP_TYPE_UNSPEC) {
-		pr_warning("map '%s': map type isn't specified.\n", map_name);
+		pr_warn("map '%s': map type isn't specified.\n", map_name);
 		return -EINVAL;
 	}
 
@@ -1283,8 +1282,8 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict)
 	if (scn)
 		data = elf_getdata(scn, NULL);
 	if (!scn || !data) {
-		pr_warning("failed to get Elf_Data from map section %d (%s)\n",
-			   obj->efile.maps_shndx, MAPS_ELF_SEC);
+		pr_warn("failed to get Elf_Data from map section %d (%s)\n",
+			obj->efile.maps_shndx, MAPS_ELF_SEC);
 		return -EINVAL;
 	}
 
@@ -1301,7 +1300,7 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict)
 	}
 
 	if (!sec) {
-		pr_warning("DATASEC '%s' not found.\n", MAPS_ELF_SEC);
+		pr_warn("DATASEC '%s' not found.\n", MAPS_ELF_SEC);
 		return -ENOENT;
 	}
 
@@ -1445,14 +1444,13 @@ static int bpf_object__init_btf(struct bpf_object *obj,
 	if (btf_data) {
 		obj->btf = btf__new(btf_data->d_buf, btf_data->d_size);
 		if (IS_ERR(obj->btf)) {
-			pr_warning("Error loading ELF section %s: %d.\n",
-				   BTF_ELF_SEC, err);
+			pr_warn("Error loading ELF section %s: %d.\n",
+				BTF_ELF_SEC, err);
 			goto out;
 		}
 		err = btf__finalize_data(obj, obj->btf);
 		if (err) {
-			pr_warning("Error finalizing %s: %d.\n",
-				   BTF_ELF_SEC, err);
+			pr_warn("Error finalizing %s: %d.\n", BTF_ELF_SEC, err);
 			goto out;
 		}
 	}
@@ -1465,8 +1463,8 @@ static int bpf_object__init_btf(struct bpf_object *obj,
 		obj->btf_ext = btf_ext__new(btf_ext_data->d_buf,
 					    btf_ext_data->d_size);
 		if (IS_ERR(obj->btf_ext)) {
-			pr_warning("Error loading ELF section %s: %ld. Ignored and continue.\n",
-				   BTF_EXT_ELF_SEC, PTR_ERR(obj->btf_ext));
+			pr_warn("Error loading ELF section %s: %ld. Ignored and continue.\n",
+				BTF_EXT_ELF_SEC, PTR_ERR(obj->btf_ext));
 			obj->btf_ext = NULL;
 			goto out;
 		}
@@ -1482,7 +1480,7 @@ static int bpf_object__init_btf(struct bpf_object *obj,
 		obj->btf = NULL;
 	}
 	if (btf_required && !obj->btf) {
-		pr_warning("BTF is required, but is missing or corrupted.\n");
+		pr_warn("BTF is required, but is missing or corrupted.\n");
 		return err == 0 ? -ENOENT : err;
 	}
 	return 0;
@@ -1500,8 +1498,8 @@ static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj)
 
 	err = btf__load(obj->btf);
 	if (err) {
-		pr_warning("Error loading %s into kernel: %d.\n",
-			   BTF_ELF_SEC, err);
+		pr_warn("Error loading %s into kernel: %d.\n",
+			BTF_ELF_SEC, err);
 		btf__free(obj->btf);
 		obj->btf = NULL;
 		/* btf_ext can't exist without btf, so free it as well */
@@ -1527,7 +1525,7 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)
 
 	/* Elf is corrupted/truncated, avoid calling elf_strptr. */
 	if (!elf_rawdata(elf_getscn(elf, ep->e_shstrndx), NULL)) {
-		pr_warning("failed to get e_shstrndx from %s\n", obj->path);
+		pr_warn("failed to get e_shstrndx from %s\n", obj->path);
 		return -LIBBPF_ERRNO__FORMAT;
 	}
 
@@ -1538,22 +1536,22 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)
 
 		idx++;
 		if (gelf_getshdr(scn, &sh) != &sh) {
-			pr_warning("failed to get section(%d) header from %s\n",
-				   idx, obj->path);
+			pr_warn("failed to get section(%d) header from %s\n",
+				idx, obj->path);
 			return -LIBBPF_ERRNO__FORMAT;
 		}
 
 		name = elf_strptr(elf, ep->e_shstrndx, sh.sh_name);
 		if (!name) {
-			pr_warning("failed to get section(%d) name from %s\n",
-				   idx, obj->path);
+			pr_warn("failed to get section(%d) name from %s\n",
+				idx, obj->path);
 			return -LIBBPF_ERRNO__FORMAT;
 		}
 
 		data = elf_getdata(scn, 0);
 		if (!data) {
-			pr_warning("failed to get section(%d) data from %s(%s)\n",
-				   idx, name, obj->path);
+			pr_warn("failed to get section(%d) data from %s(%s)\n",
+				idx, name, obj->path);
 			return -LIBBPF_ERRNO__FORMAT;
 		}
 		pr_debug("section(%d) %s, size %ld, link %d, flags %lx, type=%d\n",
@@ -1583,8 +1581,8 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)
 			btf_ext_data = data;
 		} else if (sh.sh_type == SHT_SYMTAB) {
 			if (obj->efile.symbols) {
-				pr_warning("bpf: multiple SYMTAB in %s\n",
-					   obj->path);
+				pr_warn("bpf: multiple SYMTAB in %s\n",
+					obj->path);
 				return -LIBBPF_ERRNO__FORMAT;
 			}
 			obj->efile.symbols = data;
@@ -1600,8 +1598,8 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)
 					char *cp = libbpf_strerror_r(-err, errmsg,
 								     sizeof(errmsg));
 
-					pr_warning("failed to alloc program %s (%s): %s",
-						   name, obj->path, cp);
+					pr_warn("failed to alloc program %s (%s): %s",
+						name, obj->path, cp);
 					return err;
 				}
 			} else if (strcmp(name, ".data") == 0) {
@@ -1628,7 +1626,7 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)
 			reloc = reallocarray(reloc, nr_reloc + 1,
 					     sizeof(*obj->efile.reloc));
 			if (!reloc) {
-				pr_warning("realloc failed\n");
+				pr_warn("realloc failed\n");
 				return -ENOMEM;
 			}
 
@@ -1646,7 +1644,7 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)
 	}
 
 	if (!obj->efile.strtabidx || obj->efile.strtabidx >= idx) {
-		pr_warning("Corrupted ELF file: index of strtab invalid\n");
+		pr_warn("Corrupted ELF file: index of strtab invalid\n");
 		return -LIBBPF_ERRNO__FORMAT;
 	}
 	err = bpf_object__init_btf(obj, btf_data, btf_ext_data);
@@ -1736,7 +1734,7 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr,
 
 	prog->reloc_desc = malloc(sizeof(*prog->reloc_desc) * nrels);
 	if (!prog->reloc_desc) {
-		pr_warning("failed to alloc memory in relocation\n");
+		pr_warn("failed to alloc memory in relocation\n");
 		return -ENOMEM;
 	}
 	prog->nr_reloc = nrels;
@@ -1752,13 +1750,13 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr,
 		GElf_Rel rel;
 
 		if (!gelf_getrel(data, i, &rel)) {
-			pr_warning("relocation: failed to get %d reloc\n", i);
+			pr_warn("relocation: failed to get %d reloc\n", i);
 			return -LIBBPF_ERRNO__FORMAT;
 		}
 
 		if (!gelf_getsym(symbols, GELF_R_SYM(rel.r_info), &sym)) {
-			pr_warning("relocation: symbol %"PRIx64" not found\n",
-				   GELF_R_SYM(rel.r_info));
+			pr_warn("relocation: symbol %"PRIx64" not found\n",
+				GELF_R_SYM(rel.r_info));
 			return -LIBBPF_ERRNO__FORMAT;
 		}
 
@@ -1775,20 +1773,20 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr,
 			 insn_idx, shdr_idx);
 
 		if (shdr_idx >= SHN_LORESERVE) {
-			pr_warning("relocation: not yet supported relo for non-static global \'%s\' variable in special section (0x%x) found in insns[%d].code 0x%x\n",
+			pr_warn("relocation: not yet supported relo for non-static global \'%s\' variable in special section (0x%x) found in insns[%d].code 0x%x\n",
 				   name, shdr_idx, insn_idx,
 				   insns[insn_idx].code);
 			return -LIBBPF_ERRNO__RELOC;
 		}
 		if (!bpf_object__relo_in_known_section(obj, shdr_idx)) {
-			pr_warning("Program '%s' contains unrecognized relo data pointing to section %u\n",
-				   prog->section_name, shdr_idx);
+			pr_warn("Program '%s' contains unrecognized relo data pointing to section %u\n",
+				prog->section_name, shdr_idx);
 			return -LIBBPF_ERRNO__RELOC;
 		}
 
 		if (insns[insn_idx].code == (BPF_JMP | BPF_CALL)) {
 			if (insns[insn_idx].src_reg != BPF_PSEUDO_CALL) {
-				pr_warning("incorrect bpf_call opcode\n");
+				pr_warn("incorrect bpf_call opcode\n");
 				return -LIBBPF_ERRNO__RELOC;
 			}
 			prog->reloc_desc[i].type = RELO_CALL;
@@ -1799,8 +1797,8 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr,
 		}
 
 		if (insns[insn_idx].code != (BPF_LD | BPF_IMM | BPF_DW)) {
-			pr_warning("bpf: relocation: invalid relo for insns[%d].code 0x%x\n",
-				   insn_idx, insns[insn_idx].code);
+			pr_warn("bpf: relocation: invalid relo for insns[%d].code 0x%x\n",
+				insn_idx, insns[insn_idx].code);
 			return -LIBBPF_ERRNO__RELOC;
 		}
 
@@ -1809,13 +1807,13 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr,
 			type = bpf_object__section_to_libbpf_map_type(obj, shdr_idx);
 			if (type != LIBBPF_MAP_UNSPEC) {
 				if (GELF_ST_BIND(sym.st_info) == STB_GLOBAL) {
-					pr_warning("bpf: relocation: not yet supported relo for non-static global \'%s\' variable found in insns[%d].code 0x%x\n",
-						   name, insn_idx, insns[insn_idx].code);
+					pr_warn("bpf: relocation: not yet supported relo for non-static global \'%s\' variable found in insns[%d].code 0x%x\n",
+						name, insn_idx, insns[insn_idx].code);
 					return -LIBBPF_ERRNO__RELOC;
 				}
 				if (!obj->caps.global_data) {
-					pr_warning("bpf: relocation: kernel does not support global \'%s\' variable access in insns[%d]\n",
-						   name, insn_idx);
+					pr_warn("bpf: relocation: kernel does not support global \'%s\' variable access in insns[%d]\n",
+						name, insn_idx);
 					return -LIBBPF_ERRNO__RELOC;
 				}
 			}
@@ -1836,8 +1834,8 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr,
 			}
 
 			if (map_idx >= nr_maps) {
-				pr_warning("bpf relocation: map_idx %d larger than %d\n",
-					   (int)map_idx, (int)nr_maps - 1);
+				pr_warn("bpf relocation: map_idx %d larger than %d\n",
+					(int)map_idx, (int)nr_maps - 1);
 				return -LIBBPF_ERRNO__RELOC;
 			}
 
@@ -1964,8 +1962,8 @@ bpf_object__probe_name(struct bpf_object *obj)
 	ret = bpf_load_program_xattr(&attr, NULL, 0);
 	if (ret < 0) {
 		cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-		pr_warning("Error in %s():%s(%d). Couldn't load basic 'r0 = 0' BPF program.\n",
-			   __func__, cp, errno);
+		pr_warn("Error in %s():%s(%d). Couldn't load basic 'r0 = 0' BPF program.\n",
+			__func__, cp, errno);
 		return -errno;
 	}
 	close(ret);
@@ -2005,8 +2003,8 @@ bpf_object__probe_global_data(struct bpf_object *obj)
 	map = bpf_create_map_xattr(&map_attr);
 	if (map < 0) {
 		cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-		pr_warning("Error in %s():%s(%d). Couldn't create simple array map.\n",
-			   __func__, cp, errno);
+		pr_warn("Error in %s():%s(%d). Couldn't create simple array map.\n",
+			__func__, cp, errno);
 		return -errno;
 	}
 
@@ -2121,8 +2119,8 @@ bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map)
 		err = bpf_map_freeze(map->fd);
 		if (err) {
 			cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-			pr_warning("Error freezing map(%s) as read-only: %s\n",
-				   map->name, cp);
+			pr_warn("Error freezing map(%s) as read-only: %s\n",
+				map->name, cp);
 			err = 0;
 		}
 	}
@@ -2161,8 +2159,8 @@ bpf_object__create_maps(struct bpf_object *obj)
 			if (!nr_cpus)
 				nr_cpus = libbpf_num_possible_cpus();
 			if (nr_cpus < 0) {
-				pr_warning("failed to determine number of system CPUs: %d\n",
-					   nr_cpus);
+				pr_warn("failed to determine number of system CPUs: %d\n",
+					nr_cpus);
 				err = nr_cpus;
 				goto err_out;
 			}
@@ -2190,8 +2188,8 @@ bpf_object__create_maps(struct bpf_object *obj)
 				 create_attr.btf_value_type_id)) {
 			err = -errno;
 			cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg));
-			pr_warning("Error in bpf_create_map_xattr(%s):%s(%d). Retrying without BTF.\n",
-				   map->name, cp, err);
+			pr_warn("Error in bpf_create_map_xattr(%s):%s(%d). Retrying without BTF.\n",
+				map->name, cp, err);
 			create_attr.btf_fd = 0;
 			create_attr.btf_key_type_id = 0;
 			create_attr.btf_value_type_id = 0;
@@ -2206,8 +2204,8 @@ bpf_object__create_maps(struct bpf_object *obj)
 			err = -errno;
 err_out:
 			cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg));
-			pr_warning("failed to create map (name: '%s'): %s(%d)\n",
-				   map->name, cp, err);
+			pr_warn("failed to create map (name: '%s'): %s(%d)\n",
+				map->name, cp, err);
 			for (j = 0; j < i; j++)
 				zclose(obj->maps[j].fd);
 			return err;
@@ -2232,8 +2230,8 @@ check_btf_ext_reloc_err(struct bpf_program *prog, int err,
 			void *btf_prog_info, const char *info_name)
 {
 	if (err != -ENOENT) {
-		pr_warning("Error in loading %s for sec %s.\n",
-			   info_name, prog->section_name);
+		pr_warn("Error in loading %s for sec %s.\n",
+			info_name, prog->section_name);
 		return err;
 	}
 
@@ -2244,14 +2242,14 @@ check_btf_ext_reloc_err(struct bpf_program *prog, int err,
 		 * Some info has already been found but has problem
 		 * in the last btf_ext reloc. Must have to error out.
 		 */
-		pr_warning("Error in relocating %s for sec %s.\n",
-			   info_name, prog->section_name);
+		pr_warn("Error in relocating %s for sec %s.\n",
+			info_name, prog->section_name);
 		return err;
 	}
 
 	/* Have problem loading the very first info. Ignore the rest. */
-	pr_warning("Cannot find %s for main program sec %s. Ignore all %s.\n",
-		   info_name, prog->section_name, info_name);
+	pr_warn("Cannot find %s for main program sec %s. Ignore all %s.\n",
+		info_name, prog->section_name, info_name);
 	return 0;
 }
 
@@ -2452,7 +2450,7 @@ static int bpf_core_spec_parse(const struct btf *btf,
 				return sz;
 			spec->offset += access_idx * sz;
 		} else {
-			pr_warning("relo for [%u] %s (at idx %d) captures type [%d] of unexpected kind %d\n",
+			pr_warn("relo for [%u] %s (at idx %d) captures type [%d] of unexpected kind %d\n",
 				   type_id, spec_str, i, id, btf_kind(t));
 			return -EINVAL;
 		}
@@ -2597,7 +2595,7 @@ static int bpf_core_fields_are_compat(const struct btf *local_btf,
 		targ_id = btf_array(targ_type)->type;
 		goto recur;
 	default:
-		pr_warning("unexpected kind %d relocated, local [%d], target [%d]\n",
+		pr_warn("unexpected kind %d relocated, local [%d], target [%d]\n",
 			   btf_kind(local_type), local_id, targ_id);
 		return 0;
 	}
@@ -2804,7 +2802,7 @@ static int bpf_core_reloc_insn(struct bpf_program *prog, int insn_off,
 			 bpf_program__title(prog, false),
 			 insn_idx, orig_off, new_off);
 	} else {
-		pr_warning("prog '%s': trying to relocate unrecognized insn #%d, code:%x, src:%x, dst:%x, off:%x, imm:%x\n",
+		pr_warn("prog '%s': trying to relocate unrecognized insn #%d, code:%x, src:%x, dst:%x, off:%x, imm:%x\n",
 			   bpf_program__title(prog, false),
 			   insn_idx, insn->code, insn->src_reg, insn->dst_reg,
 			   insn->off, insn->imm);
@@ -2895,7 +2893,7 @@ static struct btf *bpf_core_find_kernel_btf(void)
 		return btf;
 	}
 
-	pr_warning("failed to find valid kernel BTF\n");
+	pr_warn("failed to find valid kernel BTF\n");
 	return ERR_PTR(-ESRCH);
 }
 
@@ -3027,8 +3025,8 @@ static int bpf_core_reloc_offset(struct bpf_program *prog,
 
 	err = bpf_core_spec_parse(local_btf, local_id, spec_str, &local_spec);
 	if (err) {
-		pr_warning("prog '%s': relo #%d: parsing [%d] %s + %s failed: %d\n",
-			   prog_name, relo_idx, local_id, local_name, spec_str,
+		pr_warn("prog '%s': relo #%d: parsing [%d] %s + %s failed: %d\n",
+			prog_name, relo_idx, local_id, local_name, spec_str,
 			   err);
 		return -EINVAL;
 	}
@@ -3040,8 +3038,8 @@ static int bpf_core_reloc_offset(struct bpf_program *prog,
 	if (!hashmap__find(cand_cache, type_key, (void **)&cand_ids)) {
 		cand_ids = bpf_core_find_cands(local_btf, local_id, targ_btf);
 		if (IS_ERR(cand_ids)) {
-			pr_warning("prog '%s': relo #%d: target candidate search failed for [%d] %s: %ld",
-				   prog_name, relo_idx, local_id, local_name,
+			pr_warn("prog '%s': relo #%d: target candidate search failed for [%d] %s: %ld",
+				prog_name, relo_idx, local_id, local_name,
 				   PTR_ERR(cand_ids));
 			return PTR_ERR(cand_ids);
 		}
@@ -3064,8 +3062,8 @@ static int bpf_core_reloc_offset(struct bpf_program *prog,
 		bpf_core_dump_spec(LIBBPF_DEBUG, &cand_spec);
 		libbpf_print(LIBBPF_DEBUG, ": %d\n", err);
 		if (err < 0) {
-			pr_warning("prog '%s': relo #%d: matching error: %d\n",
-				   prog_name, relo_idx, err);
+			pr_warn("prog '%s': relo #%d: matching error: %d\n",
+				prog_name, relo_idx, err);
 			return err;
 		}
 		if (err == 0)
@@ -3077,9 +3075,9 @@ static int bpf_core_reloc_offset(struct bpf_program *prog,
 			/* if there are many candidates, they should all
 			 * resolve to the same offset
 			 */
-			pr_warning("prog '%s': relo #%d: offset ambiguity: %u != %u\n",
-				   prog_name, relo_idx, cand_spec.offset,
-				   targ_spec.offset);
+			pr_warn("prog '%s': relo #%d: offset ambiguity: %u != %u\n",
+				prog_name, relo_idx, cand_spec.offset,
+				targ_spec.offset);
 			return -EINVAL;
 		}
 
@@ -3088,16 +3086,16 @@ static int bpf_core_reloc_offset(struct bpf_program *prog,
 
 	cand_ids->len = j;
 	if (cand_ids->len == 0) {
-		pr_warning("prog '%s': relo #%d: no matching targets found for [%d] %s + %s\n",
-			   prog_name, relo_idx, local_id, local_name, spec_str);
+		pr_warn("prog '%s': relo #%d: no matching targets found for [%d] %s + %s\n",
+			prog_name, relo_idx, local_id, local_name, spec_str);
 		return -ESRCH;
 	}
 
 	err = bpf_core_reloc_insn(prog, relo->insn_off,
 				  local_spec.offset, targ_spec.offset);
 	if (err) {
-		pr_warning("prog '%s': relo #%d: failed to patch insn at offset %d: %d\n",
-			   prog_name, relo_idx, relo->insn_off, err);
+		pr_warn("prog '%s': relo #%d: failed to patch insn at offset %d: %d\n",
+			prog_name, relo_idx, relo->insn_off, err);
 		return -EINVAL;
 	}
 
@@ -3122,8 +3120,7 @@ bpf_core_reloc_offsets(struct bpf_object *obj, const char *targ_btf_path)
 	else
 		targ_btf = bpf_core_find_kernel_btf();
 	if (IS_ERR(targ_btf)) {
-		pr_warning("failed to get target BTF: %ld\n",
-			   PTR_ERR(targ_btf));
+		pr_warn("failed to get target BTF: %ld\n", PTR_ERR(targ_btf));
 		return PTR_ERR(targ_btf);
 	}
 
@@ -3142,8 +3139,8 @@ bpf_core_reloc_offsets(struct bpf_object *obj, const char *targ_btf_path)
 		}
 		prog = bpf_object__find_program_by_title(obj, sec_name);
 		if (!prog) {
-			pr_warning("failed to find program '%s' for CO-RE offset relocation\n",
-				   sec_name);
+			pr_warn("failed to find program '%s' for CO-RE offset relocation\n",
+				sec_name);
 			err = -EINVAL;
 			goto out;
 		}
@@ -3155,8 +3152,8 @@ bpf_core_reloc_offsets(struct bpf_object *obj, const char *targ_btf_path)
 			err = bpf_core_reloc_offset(prog, rec, i, obj->btf,
 						    targ_btf, cand_cache);
 			if (err) {
-				pr_warning("prog '%s': relo #%d: failed to relocate: %d\n",
-					   sec_name, i, err);
+				pr_warn("prog '%s': relo #%d: failed to relocate: %d\n",
+					sec_name, i, err);
 				goto out;
 			}
 		}
@@ -3197,21 +3194,21 @@ bpf_program__reloc_text(struct bpf_program *prog, struct bpf_object *obj,
 		return -LIBBPF_ERRNO__RELOC;
 
 	if (prog->idx == obj->efile.text_shndx) {
-		pr_warning("relo in .text insn %d into off %d\n",
-			   relo->insn_idx, relo->text_off);
+		pr_warn("relo in .text insn %d into off %d\n",
+			relo->insn_idx, relo->text_off);
 		return -LIBBPF_ERRNO__RELOC;
 	}
 
 	if (prog->main_prog_cnt == 0) {
 		text = bpf_object__find_prog_by_idx(obj, obj->efile.text_shndx);
 		if (!text) {
-			pr_warning("no .text section found yet relo into text exist\n");
+			pr_warn("no .text section found yet relo into text exist\n");
 			return -LIBBPF_ERRNO__RELOC;
 		}
 		new_cnt = prog->insns_cnt + text->insns_cnt;
 		new_insn = reallocarray(prog->insns, new_cnt, sizeof(*insn));
 		if (!new_insn) {
-			pr_warning("oom in prog realloc\n");
+			pr_warn("oom in prog realloc\n");
 			return -ENOMEM;
 		}
 
@@ -3266,8 +3263,8 @@ bpf_program__relocate(struct bpf_program *prog, struct bpf_object *obj)
 			map_idx = prog->reloc_desc[i].map_idx;
 
 			if (insn_idx + 1 >= (int)prog->insns_cnt) {
-				pr_warning("relocation out of range: '%s'\n",
-					   prog->section_name);
+				pr_warn("relocation out of range: '%s'\n",
+					prog->section_name);
 				return -LIBBPF_ERRNO__RELOC;
 			}
 
@@ -3301,8 +3298,8 @@ bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path)
 	if (obj->btf_ext) {
 		err = bpf_object__relocate_core(obj, targ_btf_path);
 		if (err) {
-			pr_warning("failed to perform CO-RE relocations: %d\n",
-				   err);
+			pr_warn("failed to perform CO-RE relocations: %d\n",
+				err);
 			return err;
 		}
 	}
@@ -3311,8 +3308,7 @@ bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path)
 
 		err = bpf_program__relocate(prog, obj);
 		if (err) {
-			pr_warning("failed to relocate '%s'\n",
-				   prog->section_name);
+			pr_warn("failed to relocate '%s'\n", prog->section_name);
 			return err;
 		}
 	}
@@ -3324,7 +3320,7 @@ static int bpf_object__collect_reloc(struct bpf_object *obj)
 	int i, err;
 
 	if (!obj_elf_valid(obj)) {
-		pr_warning("Internal error: elf object is closed\n");
+		pr_warn("Internal error: elf object is closed\n");
 		return -LIBBPF_ERRNO__INTERNAL;
 	}
 
@@ -3335,13 +3331,13 @@ static int bpf_object__collect_reloc(struct bpf_object *obj)
 		struct bpf_program *prog;
 
 		if (shdr->sh_type != SHT_REL) {
-			pr_warning("internal error at %d\n", __LINE__);
+			pr_warn("internal error at %d\n", __LINE__);
 			return -LIBBPF_ERRNO__INTERNAL;
 		}
 
 		prog = bpf_object__find_prog_by_idx(obj, idx);
 		if (!prog) {
-			pr_warning("relocation failed: no section(%d)\n", idx);
+			pr_warn("relocation failed: no section(%d)\n", idx);
 			return -LIBBPF_ERRNO__RELOC;
 		}
 
@@ -3393,7 +3389,7 @@ load_program(struct bpf_program *prog, struct bpf_insn *insns, int insns_cnt,
 retry_load:
 	log_buf = malloc(log_buf_size);
 	if (!log_buf)
-		pr_warning("Alloc log buffer for bpf loader error, continue without log\n");
+		pr_warn("Alloc log buffer for bpf loader error, continue without log\n");
 
 	ret = bpf_load_program_xattr(&load_attr, log_buf, log_buf_size);
 
@@ -3412,16 +3408,16 @@ load_program(struct bpf_program *prog, struct bpf_insn *insns, int insns_cnt,
 	}
 	ret = -LIBBPF_ERRNO__LOAD;
 	cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-	pr_warning("load bpf program failed: %s\n", cp);
+	pr_warn("load bpf program failed: %s\n", cp);
 
 	if (log_buf && log_buf[0] != '\0') {
 		ret = -LIBBPF_ERRNO__VERIFY;
-		pr_warning("-- BEGIN DUMP LOG ---\n");
-		pr_warning("\n%s\n", log_buf);
-		pr_warning("-- END LOG --\n");
+		pr_warn("-- BEGIN DUMP LOG ---\n");
+		pr_warn("\n%s\n", log_buf);
+		pr_warn("-- END LOG --\n");
 	} else if (load_attr.insns_cnt >= BPF_MAXINSNS) {
-		pr_warning("Program too large (%zu insns), at most %d insns\n",
-			   load_attr.insns_cnt, BPF_MAXINSNS);
+		pr_warn("Program too large (%zu insns), at most %d insns\n",
+			load_attr.insns_cnt, BPF_MAXINSNS);
 		ret = -LIBBPF_ERRNO__PROG2BIG;
 	} else {
 		/* Wrong program type? */
@@ -3455,14 +3451,14 @@ bpf_program__load(struct bpf_program *prog,
 
 	if (prog->instances.nr < 0 || !prog->instances.fds) {
 		if (prog->preprocessor) {
-			pr_warning("Internal error: can't load program '%s'\n",
-				   prog->section_name);
+			pr_warn("Internal error: can't load program '%s'\n",
+				prog->section_name);
 			return -LIBBPF_ERRNO__INTERNAL;
 		}
 
 		prog->instances.fds = malloc(sizeof(int));
 		if (!prog->instances.fds) {
-			pr_warning("Not enough memory for BPF fds\n");
+			pr_warn("Not enough memory for BPF fds\n");
 			return -ENOMEM;
 		}
 		prog->instances.nr = 1;
@@ -3471,8 +3467,8 @@ bpf_program__load(struct bpf_program *prog,
 
 	if (!prog->preprocessor) {
 		if (prog->instances.nr != 1) {
-			pr_warning("Program '%s' is inconsistent: nr(%d) != 1\n",
-				   prog->section_name, prog->instances.nr);
+			pr_warn("Program '%s' is inconsistent: nr(%d) != 1\n",
+				prog->section_name, prog->instances.nr);
 		}
 		err = load_program(prog, prog->insns, prog->insns_cnt,
 				   license, kern_version, &fd);
@@ -3489,8 +3485,8 @@ bpf_program__load(struct bpf_program *prog,
 		err = preprocessor(prog, i, prog->insns,
 				   prog->insns_cnt, &result);
 		if (err) {
-			pr_warning("Preprocessing the %dth instance of program '%s' failed\n",
-				   i, prog->section_name);
+			pr_warn("Preprocessing the %dth instance of program '%s' failed\n",
+				i, prog->section_name);
 			goto out;
 		}
 
@@ -3508,8 +3504,8 @@ bpf_program__load(struct bpf_program *prog,
 				   license, kern_version, &fd);
 
 		if (err) {
-			pr_warning("Loading the %dth instance of program '%s' failed\n",
-					i, prog->section_name);
+			pr_warn("Loading the %dth instance of program '%s' failed\n",
+				i, prog->section_name);
 			goto out;
 		}
 
@@ -3519,8 +3515,7 @@ bpf_program__load(struct bpf_program *prog,
 	}
 out:
 	if (err)
-		pr_warning("failed to load program '%s'\n",
-			   prog->section_name);
+		pr_warn("failed to load program '%s'\n", prog->section_name);
 	zfree(&prog->insns);
 	prog->insns_cnt = 0;
 	return err;
@@ -3589,8 +3584,7 @@ static bool bpf_prog_type__needs_kver(enum bpf_prog_type type)
 static int bpf_object__validate(struct bpf_object *obj, bool needs_kver)
 {
 	if (needs_kver && obj->kern_version == 0) {
-		pr_warning("%s doesn't provide kernel version\n",
-			   obj->path);
+		pr_warn("%s doesn't provide kernel version\n", obj->path);
 		return -LIBBPF_ERRNO__KVERSION;
 	}
 	return 0;
@@ -3604,7 +3598,7 @@ __bpf_object__open(const char *path, void *obj_buf, size_t obj_buf_sz,
 	int err;
 
 	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);
 	}
 
@@ -3704,7 +3698,7 @@ int bpf_object__load_xattr(struct bpf_object_load_attr *attr)
 		return -EINVAL;
 
 	if (obj->loaded) {
-		pr_warning("object should not be loaded twice\n");
+		pr_warn("object should not be loaded twice\n");
 		return -EINVAL;
 	}
 
@@ -3717,7 +3711,7 @@ int bpf_object__load_xattr(struct bpf_object_load_attr *attr)
 	return 0;
 out:
 	bpf_object__unload(obj);
-	pr_warning("failed to load object '%s'\n", obj->path);
+	pr_warn("failed to load object '%s'\n", obj->path);
 	return err;
 }
 
@@ -3747,13 +3741,13 @@ static int check_path(const char *path)
 	dir = dirname(dname);
 	if (statfs(dir, &st_fs)) {
 		cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-		pr_warning("failed to statfs %s: %s\n", dir, cp);
+		pr_warn("failed to statfs %s: %s\n", dir, cp);
 		err = -errno;
 	}
 	free(dname);
 
 	if (!err && st_fs.f_type != BPF_FS_MAGIC) {
-		pr_warning("specified path %s is not on BPF FS\n", path);
+		pr_warn("specified path %s is not on BPF FS\n", path);
 		err = -EINVAL;
 	}
 
@@ -3771,19 +3765,19 @@ int bpf_program__pin_instance(struct bpf_program *prog, const char *path,
 		return err;
 
 	if (prog == NULL) {
-		pr_warning("invalid program pointer\n");
+		pr_warn("invalid program pointer\n");
 		return -EINVAL;
 	}
 
 	if (instance < 0 || instance >= prog->instances.nr) {
-		pr_warning("invalid prog instance %d of prog %s (max %d)\n",
-			   instance, prog->section_name, prog->instances.nr);
+		pr_warn("invalid prog instance %d of prog %s (max %d)\n",
+			instance, prog->section_name, prog->instances.nr);
 		return -EINVAL;
 	}
 
 	if (bpf_obj_pin(prog->instances.fds[instance], path)) {
 		cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-		pr_warning("failed to pin program: %s\n", cp);
+		pr_warn("failed to pin program: %s\n", cp);
 		return -errno;
 	}
 	pr_debug("pinned program '%s'\n", path);
@@ -3801,13 +3795,13 @@ int bpf_program__unpin_instance(struct bpf_program *prog, const char *path,
 		return err;
 
 	if (prog == NULL) {
-		pr_warning("invalid program pointer\n");
+		pr_warn("invalid program pointer\n");
 		return -EINVAL;
 	}
 
 	if (instance < 0 || instance >= prog->instances.nr) {
-		pr_warning("invalid prog instance %d of prog %s (max %d)\n",
-			   instance, prog->section_name, prog->instances.nr);
+		pr_warn("invalid prog instance %d of prog %s (max %d)\n",
+			instance, prog->section_name, prog->instances.nr);
 		return -EINVAL;
 	}
 
@@ -3829,7 +3823,7 @@ static int make_dir(const char *path)
 
 	if (err) {
 		cp = libbpf_strerror_r(-err, errmsg, sizeof(errmsg));
-		pr_warning("failed to mkdir %s: %s\n", path, cp);
+		pr_warn("failed to mkdir %s: %s\n", path, cp);
 	}
 	return err;
 }
@@ -3843,12 +3837,12 @@ int bpf_program__pin(struct bpf_program *prog, const char *path)
 		return err;
 
 	if (prog == NULL) {
-		pr_warning("invalid program pointer\n");
+		pr_warn("invalid program pointer\n");
 		return -EINVAL;
 	}
 
 	if (prog->instances.nr <= 0) {
-		pr_warning("no instances of prog %s to pin\n",
+		pr_warn("no instances of prog %s to pin\n",
 			   prog->section_name);
 		return -EINVAL;
 	}
@@ -3910,12 +3904,12 @@ int bpf_program__unpin(struct bpf_program *prog, const char *path)
 		return err;
 
 	if (prog == NULL) {
-		pr_warning("invalid program pointer\n");
+		pr_warn("invalid program pointer\n");
 		return -EINVAL;
 	}
 
 	if (prog->instances.nr <= 0) {
-		pr_warning("no instances of prog %s to pin\n",
+		pr_warn("no instances of prog %s to pin\n",
 			   prog->section_name);
 		return -EINVAL;
 	}
@@ -3957,13 +3951,13 @@ int bpf_map__pin(struct bpf_map *map, const char *path)
 		return err;
 
 	if (map == NULL) {
-		pr_warning("invalid map pointer\n");
+		pr_warn("invalid map pointer\n");
 		return -EINVAL;
 	}
 
 	if (bpf_obj_pin(map->fd, path)) {
 		cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg));
-		pr_warning("failed to pin map: %s\n", cp);
+		pr_warn("failed to pin map: %s\n", cp);
 		return -errno;
 	}
 
@@ -3981,7 +3975,7 @@ int bpf_map__unpin(struct bpf_map *map, const char *path)
 		return err;
 
 	if (map == NULL) {
-		pr_warning("invalid map pointer\n");
+		pr_warn("invalid map pointer\n");
 		return -EINVAL;
 	}
 
@@ -4002,7 +3996,7 @@ int bpf_object__pin_maps(struct bpf_object *obj, const char *path)
 		return -ENOENT;
 
 	if (!obj->loaded) {
-		pr_warning("object not yet loaded; load it first\n");
+		pr_warn("object not yet loaded; load it first\n");
 		return -ENOENT;
 	}
 
@@ -4085,7 +4079,7 @@ int bpf_object__pin_programs(struct bpf_object *obj, const char *path)
 		return -ENOENT;
 
 	if (!obj->loaded) {
-		pr_warning("object not yet loaded; load it first\n");
+		pr_warn("object not yet loaded; load it first\n");
 		return -ENOENT;
 	}
 
@@ -4286,7 +4280,7 @@ __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj,
 			&obj->programs[nr_programs - 1];
 
 	if (p->obj != obj) {
-		pr_warning("error: program handler doesn't match object\n");
+		pr_warn("error: program handler doesn't match object\n");
 		return NULL;
 	}
 
@@ -4349,7 +4343,7 @@ const char *bpf_program__title(const struct bpf_program *prog, bool needs_copy)
 	if (needs_copy) {
 		title = strdup(title);
 		if (!title) {
-			pr_warning("failed to strdup program title\n");
+			pr_warn("failed to strdup program title\n");
 			return ERR_PTR(-ENOMEM);
 		}
 	}
@@ -4371,13 +4365,13 @@ int bpf_program__set_prep(struct bpf_program *prog, int nr_instances,
 		return -EINVAL;
 
 	if (prog->instances.nr > 0 || prog->instances.fds) {
-		pr_warning("Can't set pre-processor after loading\n");
+		pr_warn("Can't set pre-processor after loading\n");
 		return -EINVAL;
 	}
 
 	instances_fds = malloc(sizeof(int) * nr_instances);
 	if (!instances_fds) {
-		pr_warning("alloc memory failed for fds\n");
+		pr_warn("alloc memory failed for fds\n");
 		return -ENOMEM;
 	}
 
@@ -4398,15 +4392,15 @@ int bpf_program__nth_fd(const struct bpf_program *prog, int n)
 		return -EINVAL;
 
 	if (n >= prog->instances.nr || n < 0) {
-		pr_warning("Can't get the %dth fd from program %s: only %d instances\n",
-			   n, prog->section_name, prog->instances.nr);
+		pr_warn("Can't get the %dth fd from program %s: only %d instances\n",
+			n, prog->section_name, prog->instances.nr);
 		return -EINVAL;
 	}
 
 	fd = prog->instances.fds[n];
 	if (fd < 0) {
-		pr_warning("%dth instance of program '%s' is invalid\n",
-			   n, prog->section_name);
+		pr_warn("%dth instance of program '%s' is invalid\n",
+			n, prog->section_name);
 		return -ENOENT;
 	}
 
@@ -4593,7 +4587,7 @@ int libbpf_prog_type_by_name(const char *name, enum bpf_prog_type *prog_type,
 		*expected_attach_type = section_names[i].expected_attach_type;
 		return 0;
 	}
-	pr_warning("failed to guess program type based on ELF section name '%s'\n", name);
+	pr_warn("failed to guess program type based on ELF section name '%s'\n", name);
 	type_names = libbpf_get_type_names(false);
 	if (type_names != NULL) {
 		pr_info("supported section(type) names are:%s\n", type_names);
@@ -4620,7 +4614,7 @@ int libbpf_attach_type_by_name(const char *name,
 		*attach_type = section_names[i].attach_type;
 		return 0;
 	}
-	pr_warning("failed to guess attach type based on ELF section name '%s'\n", name);
+	pr_warn("failed to guess attach type based on ELF section name '%s'\n", name);
 	type_names = libbpf_get_type_names(true);
 	if (type_names != NULL) {
 		pr_info("attachable section(type) names are:%s\n", type_names);
@@ -4703,11 +4697,11 @@ void bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex)
 int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd)
 {
 	if (!bpf_map_type__is_map_in_map(map->def.type)) {
-		pr_warning("error: unsupported map type\n");
+		pr_warn("error: unsupported map type\n");
 		return -EINVAL;
 	}
 	if (map->inner_map_fd != -1) {
-		pr_warning("error: inner_map_fd already specified\n");
+		pr_warn("error: inner_map_fd already specified\n");
 		return -EINVAL;
 	}
 	map->inner_map_fd = fd;
@@ -4727,8 +4721,8 @@ __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i)
 	e = obj->maps + obj->nr_maps;
 
 	if ((m < s) || (m >= e)) {
-		pr_warning("error in %s: map handler doesn't belong to object\n",
-			   __func__);
+		pr_warn("error in %s: map handler doesn't belong to object\n",
+			 __func__);
 		return NULL;
 	}
 
@@ -4857,7 +4851,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
 	}
 
 	if (!first_prog) {
-		pr_warning("object file doesn't contain bpf program\n");
+		pr_warn("object file doesn't contain bpf program\n");
 		bpf_object__close(obj);
 		return -ENOENT;
 	}
@@ -4916,14 +4910,14 @@ struct bpf_link *bpf_program__attach_perf_event(struct bpf_program *prog,
 	int prog_fd, err;
 
 	if (pfd < 0) {
-		pr_warning("program '%s': invalid perf event FD %d\n",
-			   bpf_program__title(prog, false), pfd);
+		pr_warn("program '%s': invalid perf event FD %d\n",
+			bpf_program__title(prog, false), pfd);
 		return ERR_PTR(-EINVAL);
 	}
 	prog_fd = bpf_program__fd(prog);
 	if (prog_fd < 0) {
-		pr_warning("program '%s': can't attach BPF program w/o FD (did you load it?)\n",
-			   bpf_program__title(prog, false));
+		pr_warn("program '%s': can't attach BPF program w/o FD (did you load it?)\n",
+			bpf_program__title(prog, false));
 		return ERR_PTR(-EINVAL);
 	}
 
@@ -4936,16 +4930,16 @@ struct bpf_link *bpf_program__attach_perf_event(struct bpf_program *prog,
 	if (ioctl(pfd, PERF_EVENT_IOC_SET_BPF, prog_fd) < 0) {
 		err = -errno;
 		free(link);
-		pr_warning("program '%s': failed to attach to pfd %d: %s\n",
-			   bpf_program__title(prog, false), pfd,
+		pr_warn("program '%s': failed to attach to pfd %d: %s\n",
+			bpf_program__title(prog, false), pfd,
 			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return ERR_PTR(err);
 	}
 	if (ioctl(pfd, PERF_EVENT_IOC_ENABLE, 0) < 0) {
 		err = -errno;
 		free(link);
-		pr_warning("program '%s': failed to enable pfd %d: %s\n",
-			   bpf_program__title(prog, false), pfd,
+		pr_warn("program '%s': failed to enable pfd %d: %s\n",
+			bpf_program__title(prog, false), pfd,
 			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return ERR_PTR(err);
 	}
@@ -5020,9 +5014,9 @@ static int perf_event_open_probe(bool uprobe, bool retprobe, const char *name,
 	type = uprobe ? determine_uprobe_perf_type()
 		      : determine_kprobe_perf_type();
 	if (type < 0) {
-		pr_warning("failed to determine %s perf type: %s\n",
-			   uprobe ? "uprobe" : "kprobe",
-			   libbpf_strerror_r(type, errmsg, sizeof(errmsg)));
+		pr_warn("failed to determine %s perf type: %s\n",
+			uprobe ? "uprobe" : "kprobe",
+			libbpf_strerror_r(type, errmsg, sizeof(errmsg)));
 		return type;
 	}
 	if (retprobe) {
@@ -5030,10 +5024,9 @@ static int perf_event_open_probe(bool uprobe, bool retprobe, const char *name,
 				 : determine_kprobe_retprobe_bit();
 
 		if (bit < 0) {
-			pr_warning("failed to determine %s retprobe bit: %s\n",
-				   uprobe ? "uprobe" : "kprobe",
-				   libbpf_strerror_r(bit, errmsg,
-						     sizeof(errmsg)));
+			pr_warn("failed to determine %s retprobe bit: %s\n",
+				uprobe ? "uprobe" : "kprobe",
+				libbpf_strerror_r(bit, errmsg, sizeof(errmsg)));
 			return bit;
 		}
 		attr.config |= 1 << bit;
@@ -5050,9 +5043,9 @@ static int perf_event_open_probe(bool uprobe, bool retprobe, const char *name,
 		      -1 /* group_fd */, PERF_FLAG_FD_CLOEXEC);
 	if (pfd < 0) {
 		err = -errno;
-		pr_warning("%s perf_event_open() failed: %s\n",
-			   uprobe ? "uprobe" : "kprobe",
-			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
+		pr_warn("%s perf_event_open() failed: %s\n",
+			uprobe ? "uprobe" : "kprobe",
+			libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return err;
 	}
 	return pfd;
@@ -5069,20 +5062,20 @@ struct bpf_link *bpf_program__attach_kprobe(struct bpf_program *prog,
 	pfd = perf_event_open_probe(false /* uprobe */, retprobe, func_name,
 				    0 /* offset */, -1 /* pid */);
 	if (pfd < 0) {
-		pr_warning("program '%s': failed to create %s '%s' perf event: %s\n",
-			   bpf_program__title(prog, false),
-			   retprobe ? "kretprobe" : "kprobe", func_name,
-			   libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
+		pr_warn("program '%s': failed to create %s '%s' perf event: %s\n",
+			bpf_program__title(prog, false),
+			retprobe ? "kretprobe" : "kprobe", func_name,
+			libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
 		return ERR_PTR(pfd);
 	}
 	link = bpf_program__attach_perf_event(prog, pfd);
 	if (IS_ERR(link)) {
 		close(pfd);
 		err = PTR_ERR(link);
-		pr_warning("program '%s': failed to attach to %s '%s': %s\n",
-			   bpf_program__title(prog, false),
-			   retprobe ? "kretprobe" : "kprobe", func_name,
-			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
+		pr_warn("program '%s': failed to attach to %s '%s': %s\n",
+			bpf_program__title(prog, false),
+			retprobe ? "kretprobe" : "kprobe", func_name,
+			libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return link;
 	}
 	return link;
@@ -5100,8 +5093,8 @@ struct bpf_link *bpf_program__attach_uprobe(struct bpf_program *prog,
 	pfd = perf_event_open_probe(true /* uprobe */, retprobe,
 				    binary_path, func_offset, pid);
 	if (pfd < 0) {
-		pr_warning("program '%s': failed to create %s '%s:0x%zx' perf event: %s\n",
-			   bpf_program__title(prog, false),
+		pr_warn("program '%s': failed to create %s '%s:0x%zx' perf event: %s\n",
+			bpf_program__title(prog, false),
 			   retprobe ? "uretprobe" : "uprobe",
 			   binary_path, func_offset,
 			   libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
@@ -5111,11 +5104,11 @@ struct bpf_link *bpf_program__attach_uprobe(struct bpf_program *prog,
 	if (IS_ERR(link)) {
 		close(pfd);
 		err = PTR_ERR(link);
-		pr_warning("program '%s': failed to attach to %s '%s:0x%zx': %s\n",
-			   bpf_program__title(prog, false),
-			   retprobe ? "uretprobe" : "uprobe",
-			   binary_path, func_offset,
-			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
+		pr_warn("program '%s': failed to attach to %s '%s:0x%zx': %s\n",
+			bpf_program__title(prog, false),
+			retprobe ? "uretprobe" : "uprobe",
+			binary_path, func_offset,
+			libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return link;
 	}
 	return link;
@@ -5149,9 +5142,9 @@ static int perf_event_open_tracepoint(const char *tp_category,
 
 	tp_id = determine_tracepoint_id(tp_category, tp_name);
 	if (tp_id < 0) {
-		pr_warning("failed to determine tracepoint '%s/%s' perf event ID: %s\n",
-			   tp_category, tp_name,
-			   libbpf_strerror_r(tp_id, errmsg, sizeof(errmsg)));
+		pr_warn("failed to determine tracepoint '%s/%s' perf event ID: %s\n",
+			tp_category, tp_name,
+			libbpf_strerror_r(tp_id, errmsg, sizeof(errmsg)));
 		return tp_id;
 	}
 
@@ -5163,9 +5156,9 @@ static int perf_event_open_tracepoint(const char *tp_category,
 		      -1 /* group_fd */, PERF_FLAG_FD_CLOEXEC);
 	if (pfd < 0) {
 		err = -errno;
-		pr_warning("tracepoint '%s/%s' perf_event_open() failed: %s\n",
-			   tp_category, tp_name,
-			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
+		pr_warn("tracepoint '%s/%s' perf_event_open() failed: %s\n",
+			tp_category, tp_name,
+			libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return err;
 	}
 	return pfd;
@@ -5181,20 +5174,20 @@ struct bpf_link *bpf_program__attach_tracepoint(struct bpf_program *prog,
 
 	pfd = perf_event_open_tracepoint(tp_category, tp_name);
 	if (pfd < 0) {
-		pr_warning("program '%s': failed to create tracepoint '%s/%s' perf event: %s\n",
-			   bpf_program__title(prog, false),
-			   tp_category, tp_name,
-			   libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
+		pr_warn("program '%s': failed to create tracepoint '%s/%s' perf event: %s\n",
+			bpf_program__title(prog, false),
+			tp_category, tp_name,
+			libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
 		return ERR_PTR(pfd);
 	}
 	link = bpf_program__attach_perf_event(prog, pfd);
 	if (IS_ERR(link)) {
 		close(pfd);
 		err = PTR_ERR(link);
-		pr_warning("program '%s': failed to attach to tracepoint '%s/%s': %s\n",
-			   bpf_program__title(prog, false),
-			   tp_category, tp_name,
-			   libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
+		pr_warn("program '%s': failed to attach to tracepoint '%s/%s': %s\n",
+			bpf_program__title(prog, false),
+			tp_category, tp_name,
+			libbpf_strerror_r(err, errmsg, sizeof(errmsg)));
 		return link;
 	}
 	return link;
@@ -5216,8 +5209,8 @@ struct bpf_link *bpf_program__attach_raw_tracepoint(struct bpf_program *prog,
 
 	prog_fd = bpf_program__fd(prog);
 	if (prog_fd < 0) {
-		pr_warning("program '%s': can't attach before loaded\n",
-			   bpf_program__title(prog, false));
+		pr_warn("program '%s': can't attach before loaded\n",
+			bpf_program__title(prog, false));
 		return ERR_PTR(-EINVAL);
 	}
 
@@ -5230,9 +5223,9 @@ struct bpf_link *bpf_program__attach_raw_tracepoint(struct bpf_program *prog,
 	if (pfd < 0) {
 		pfd = -errno;
 		free(link);
-		pr_warning("program '%s': failed to attach to raw tracepoint '%s': %s\n",
-			   bpf_program__title(prog, false), tp_name,
-			   libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
+		pr_warn("program '%s': failed to attach to raw tracepoint '%s': %s\n",
+			bpf_program__title(prog, false), tp_name,
+			libbpf_strerror_r(pfd, errmsg, sizeof(errmsg)));
 		return ERR_PTR(pfd);
 	}
 	link->fd = pfd;
@@ -5334,7 +5327,7 @@ static void perf_buffer__free_cpu_buf(struct perf_buffer *pb,
 		return;
 	if (cpu_buf->base &&
 	    munmap(cpu_buf->base, pb->mmap_size + pb->page_size))
-		pr_warning("failed to munmap cpu_buf #%d\n", cpu_buf->cpu);
+		pr_warn("failed to munmap cpu_buf #%d\n", cpu_buf->cpu);
 	if (cpu_buf->fd >= 0) {
 		ioctl(cpu_buf->fd, PERF_EVENT_IOC_DISABLE, 0);
 		close(cpu_buf->fd);
@@ -5384,8 +5377,8 @@ perf_buffer__open_cpu_buf(struct perf_buffer *pb, struct perf_event_attr *attr,
 			      -1, PERF_FLAG_FD_CLOEXEC);
 	if (cpu_buf->fd < 0) {
 		err = -errno;
-		pr_warning("failed to open perf buffer event on cpu #%d: %s\n",
-			   cpu, libbpf_strerror_r(err, msg, sizeof(msg)));
+		pr_warn("failed to open perf buffer event on cpu #%d: %s\n",
+			cpu, libbpf_strerror_r(err, msg, sizeof(msg)));
 		goto error;
 	}
 
@@ -5395,15 +5388,15 @@ perf_buffer__open_cpu_buf(struct perf_buffer *pb, struct perf_event_attr *attr,
 	if (cpu_buf->base == MAP_FAILED) {
 		cpu_buf->base = NULL;
 		err = -errno;
-		pr_warning("failed to mmap perf buffer on cpu #%d: %s\n",
-			   cpu, libbpf_strerror_r(err, msg, sizeof(msg)));
+		pr_warn("failed to mmap perf buffer on cpu #%d: %s\n",
+			cpu, libbpf_strerror_r(err, msg, sizeof(msg)));
 		goto error;
 	}
 
 	if (ioctl(cpu_buf->fd, PERF_EVENT_IOC_ENABLE, 0) < 0) {
 		err = -errno;
-		pr_warning("failed to enable perf buffer event on cpu #%d: %s\n",
-			   cpu, libbpf_strerror_r(err, msg, sizeof(msg)));
+		pr_warn("failed to enable perf buffer event on cpu #%d: %s\n",
+			cpu, libbpf_strerror_r(err, msg, sizeof(msg)));
 		goto error;
 	}
 
@@ -5463,8 +5456,8 @@ static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt,
 	int err, i;
 
 	if (page_cnt & (page_cnt - 1)) {
-		pr_warning("page count should be power of two, but is %zu\n",
-			   page_cnt);
+		pr_warn("page count should be power of two, but is %zu\n",
+			page_cnt);
 		return ERR_PTR(-EINVAL);
 	}
 
@@ -5472,14 +5465,14 @@ static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt,
 	err = bpf_obj_get_info_by_fd(map_fd, &map, &map_info_len);
 	if (err) {
 		err = -errno;
-		pr_warning("failed to get map info for map FD %d: %s\n",
-			   map_fd, libbpf_strerror_r(err, msg, sizeof(msg)));
+		pr_warn("failed to get map info for map FD %d: %s\n",
+			map_fd, libbpf_strerror_r(err, msg, sizeof(msg)));
 		return ERR_PTR(err);
 	}
 
 	if (map.type != BPF_MAP_TYPE_PERF_EVENT_ARRAY) {
-		pr_warning("map '%s' should be BPF_MAP_TYPE_PERF_EVENT_ARRAY\n",
-			   map.name);
+		pr_warn("map '%s' should be BPF_MAP_TYPE_PERF_EVENT_ARRAY\n",
+			map.name);
 		return ERR_PTR(-EINVAL);
 	}
 
@@ -5499,8 +5492,8 @@ static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt,
 	pb->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
 	if (pb->epoll_fd < 0) {
 		err = -errno;
-		pr_warning("failed to create epoll instance: %s\n",
-			   libbpf_strerror_r(err, msg, sizeof(msg)));
+		pr_warn("failed to create epoll instance: %s\n",
+			libbpf_strerror_r(err, msg, sizeof(msg)));
 		goto error;
 	}
 
@@ -5519,13 +5512,13 @@ static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt,
 	pb->events = calloc(pb->cpu_cnt, sizeof(*pb->events));
 	if (!pb->events) {
 		err = -ENOMEM;
-		pr_warning("failed to allocate events: out of memory\n");
+		pr_warn("failed to allocate events: out of memory\n");
 		goto error;
 	}
 	pb->cpu_bufs = calloc(pb->cpu_cnt, sizeof(*pb->cpu_bufs));
 	if (!pb->cpu_bufs) {
 		err = -ENOMEM;
-		pr_warning("failed to allocate buffers: out of memory\n");
+		pr_warn("failed to allocate buffers: out of memory\n");
 		goto error;
 	}
 
@@ -5548,9 +5541,9 @@ static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt,
 					  &cpu_buf->fd, 0);
 		if (err) {
 			err = -errno;
-			pr_warning("failed to set cpu #%d, key %d -> perf FD %d: %s\n",
-				   cpu, map_key, cpu_buf->fd,
-				   libbpf_strerror_r(err, msg, sizeof(msg)));
+			pr_warn("failed to set cpu #%d, key %d -> perf FD %d: %s\n",
+				cpu, map_key, cpu_buf->fd,
+				libbpf_strerror_r(err, msg, sizeof(msg)));
 			goto error;
 		}
 
@@ -5559,9 +5552,9 @@ static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt,
 		if (epoll_ctl(pb->epoll_fd, EPOLL_CTL_ADD, cpu_buf->fd,
 			      &pb->events[i]) < 0) {
 			err = -errno;
-			pr_warning("failed to epoll_ctl cpu #%d perf FD %d: %s\n",
-				   cpu, cpu_buf->fd,
-				   libbpf_strerror_r(err, msg, sizeof(msg)));
+			pr_warn("failed to epoll_ctl cpu #%d perf FD %d: %s\n",
+				cpu, cpu_buf->fd,
+				libbpf_strerror_r(err, msg, sizeof(msg)));
 			goto error;
 		}
 	}
@@ -5614,7 +5607,7 @@ perf_buffer__process_record(struct perf_event_header *e, void *ctx)
 		break;
 	}
 	default:
-		pr_warning("unknown perf sample type %d\n", e->type);
+		pr_warn("unknown perf sample type %d\n", e->type);
 		return LIBBPF_PERF_EVENT_ERROR;
 	}
 	return LIBBPF_PERF_EVENT_CONT;
@@ -5644,7 +5637,7 @@ int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms)
 
 		err = perf_buffer__process_records(pb, cpu_buf);
 		if (err) {
-			pr_warning("error while processing records: %d\n", err);
+			pr_warn("error while processing records: %d\n", err);
 			return err;
 		}
 	}
@@ -5841,13 +5834,13 @@ bpf_program__get_prog_info_linear(int fd, __u64 arrays)
 		v2 = bpf_prog_info_read_offset_u32(&info_linear->info,
 						   desc->count_offset);
 		if (v1 != v2)
-			pr_warning("%s: mismatch in element count\n", __func__);
+			pr_warn("%s: mismatch in element count\n", __func__);
 
 		v1 = bpf_prog_info_read_offset_u32(&info, desc->size_offset);
 		v2 = bpf_prog_info_read_offset_u32(&info_linear->info,
 						   desc->size_offset);
 		if (v1 != v2)
-			pr_warning("%s: mismatch in rec size\n", __func__);
+			pr_warn("%s: mismatch in rec size\n", __func__);
 	}
 
 	/* step 7: update info_len and data_len */
@@ -5915,20 +5908,19 @@ int libbpf_num_possible_cpus(void)
 	fd = open(fcpu, O_RDONLY);
 	if (fd < 0) {
 		error = errno;
-		pr_warning("Failed to open file %s: %s\n",
-			   fcpu, strerror(error));
+		pr_warn("Failed to open file %s: %s\n", fcpu, strerror(error));
 		return -error;
 	}
 	len = read(fd, buf, sizeof(buf));
 	close(fd);
 	if (len <= 0) {
 		error = len ? errno : EINVAL;
-		pr_warning("Failed to read # of possible cpus from %s: %s\n",
-			   fcpu, strerror(error));
+		pr_warn("Failed to read # of possible cpus from %s: %s\n",
+			fcpu, strerror(error));
 		return -error;
 	}
 	if (len == sizeof(buf)) {
-		pr_warning("File %s size overflow\n", fcpu);
+		pr_warn("File %s size overflow\n", fcpu);
 		return -EOVERFLOW;
 	}
 	buf[len] = '\0';
@@ -5939,8 +5931,8 @@ int libbpf_num_possible_cpus(void)
 			buf[ir] = '\0';
 			n = sscanf(&buf[il], "%u-%u", &start, &end);
 			if (n <= 0) {
-				pr_warning("Failed to get # CPUs from %s\n",
-					   &buf[il]);
+				pr_warn("Failed to get # CPUs from %s\n",
+					&buf[il]);
 				return -EINVAL;
 			} else if (n == 1) {
 				end = start;
@@ -5950,7 +5942,7 @@ int libbpf_num_possible_cpus(void)
 		}
 	}
 	if (tmp_cpus <= 0) {
-		pr_warning("Invalid #CPUs %d from %s\n", tmp_cpus, fcpu);
+		pr_warn("Invalid #CPUs %d from %s\n", tmp_cpus, fcpu);
 		return -EINVAL;
 	}
 
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
index 2e83a34f8c79..d2febc3cedc8 100644
--- a/tools/lib/bpf/libbpf_internal.h
+++ b/tools/lib/bpf/libbpf_internal.h
@@ -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__)
 
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c
index 842c4fd55859..90bbe5c7163e 100644
--- a/tools/lib/bpf/xsk.c
+++ b/tools/lib/bpf/xsk.c
@@ -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;
 	}
 
@@ -500,7 +500,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;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 31/32] tools perf: Renaming pr_warning to pr_warn
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (29 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 30/32] tools lib bpf: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  6:25 ` [PATCH 32/32] checkpatch: Drop pr_warning check Kefeng Wang
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang, Mark Rutland, Alexander Shishkin, Jiri Olsa

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 <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 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                  |  14 ++-
 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           | 112 +++++++++++------------
 tools/perf/util/record.c                 |  18 ++--
 tools/perf/util/session.c                |   2 +-
 tools/perf/util/srcline.c                |   6 +-
 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 +-
 43 files changed, 272 insertions(+), 282 deletions(-)

diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index cb7cf16af79c..701615996bd6 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -529,7 +529,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;
 	}
 
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 4e4d2e76232e..71dbe17cf0ee 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -267,8 +267,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;
 	}
 
@@ -277,8 +277,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:
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 1a69eb565dc0..0859e3a8cdc3 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -281,11 +281,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;
@@ -446,8 +446,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);
@@ -464,8 +464,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);
@@ -482,8 +482,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);
@@ -492,7 +492,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)));
 		}
 	}
@@ -510,8 +510,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);
@@ -519,7 +519,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);
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 827e4800d862..738a035beb81 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -394,8 +394,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;
 	}
 
@@ -407,15 +407,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;
 		}
 
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index 3976aebe3677..36c1aa33d72f 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -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)
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index c14f40b858bc..c1526b7f288e 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -448,9 +448,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
 			}
 		}
@@ -838,7 +838,7 @@ int cmd_inject(int argc, const char **argv)
 		return -1;
 
 	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) {
 		/*
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 26bc5923e6b5..1f94481fc3bf 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -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;
 
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 1447004eee8a..9c30745c3602 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1318,7 +1318,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,
@@ -1424,7 +1424,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;
 	}
 
@@ -1869,7 +1869,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;
 }
@@ -1985,7 +1985,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);
 	}
@@ -2372,7 +2372,7 @@ int cmd_record(int argc, const char **argv)
 	err = -ENOMEM;
 
 	if (symbol_conf.kptr_restrict && !perf_evlist__exclude_kernel(rec->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"
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index b18fab94d38d..13d496236f6a 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -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,
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index e079b34201f2..b1491d551d0c 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2678,8 +2678,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, '-'))
@@ -2703,7 +2703,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;
@@ -2750,8 +2750,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;
@@ -3292,7 +3292,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;
 	}
 
@@ -3311,7 +3311,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;
 	}
 
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 7e17bf9f700a..45b0f3409b09 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -330,7 +330,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);
 	}
 }
 
@@ -1496,7 +1496,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;
 	}
 
@@ -1536,7 +1536,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;
 	}
 
@@ -1556,7 +1556,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;
 	}
 
@@ -1916,9 +1916,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");
@@ -1991,8 +1991,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) {
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index e0e822695a29..0462b01596f3 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -734,8 +734,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 */
@@ -767,7 +767,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;
 	}
 
@@ -777,13 +777,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;
 	}
 
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 726e3f2dd8c7..4651c6aa982b 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -592,7 +592,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)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 0f633f0d6be8..e3af61695d39 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1386,9 +1386,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;
 	}
@@ -4045,7 +4045,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;
diff --git a/tools/perf/lib/internal.h b/tools/perf/lib/internal.h
index dc92f241732e..11292bfab2f0 100644
--- a/tools/perf/lib/internal.h
+++ b/tools/perf/lib/internal.h
@@ -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__)
 
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index 586a21acc13d..065cb7360a87 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -157,7 +157,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.
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 37283e865352..bc11bb91ab7d 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -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';
diff --git a/tools/perf/util/bpf-prologue.c b/tools/perf/util/bpf-prologue.c
index b020a8678eb9..cee4e23325ad 100644
--- a/tools/perf/util/bpf-prologue.c
+++ b/tools/perf/util/bpf-prologue.c
@@ -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;
 	}
 
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index c14646c1f2eb..d8f3eba6c96c 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -568,7 +568,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);
 
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 0bc9c4d7fdc5..a0ba50291806 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -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;
 	}
 
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 0c268449959c..7679f854104f 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -442,8 +442,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);
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index e75c3a279fe8..9a2c365413c0 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -380,7 +380,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);
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index a1b59bd35519..46cf8dc61df5 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -248,12 +248,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. */
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index b2deee987ffa..dfe5056a0cb3 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -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__)
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index f4afbb858ebb..bd0a71808c98 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -149,8 +149,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';
@@ -378,10 +377,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;
 		}
@@ -1238,8 +1236,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);
 		}
 	}
 }
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 095924aa186b..5a8f62ad990b 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -1802,7 +1802,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;
 	}
 
@@ -1858,7 +1858,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;
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 85825384f9e8..9bf817b66085 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -700,9 +700,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 |
@@ -711,8 +711,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) {
@@ -721,9 +721,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;
 			}
@@ -1683,8 +1683,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;
 }
 
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index b0c34dda30a0..c32719a81aa9 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1235,7 +1235,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;
 	}
 
@@ -2690,7 +2690,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;
 	}
 
@@ -2710,7 +2710,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;
 		}
 
@@ -2764,7 +2764,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;
 	}
 
@@ -2907,7 +2907,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)
@@ -3577,9 +3577,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) {
@@ -3765,11 +3765,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;
 	}
 
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index b80f29bfc7bb..d815a17f4fc4 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -91,7 +91,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;
 	}
 
@@ -284,7 +284,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;
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 55fb4b3b1157..9cbce7f1fedd 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -332,7 +332,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"
@@ -347,7 +347,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"
@@ -398,29 +398,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);
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index b4749d3eed08..e1133b29c99d 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2346,7 +2346,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;
 		}
 
diff --git a/tools/perf/util/parse-branch-options.c b/tools/perf/util/parse-branch-options.c
index bb4aa88c50a8..ffa59286a6ed 100644
--- a/tools/perf/util/parse-branch-options.c
+++ b/tools/perf/util/parse-branch-options.c
@@ -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;
 		}
 
diff --git a/tools/perf/util/perf-hooks.c b/tools/perf/util/perf-hooks.c
index e635c594f773..54684faed18d 100644
--- a/tools/perf/util/perf-hooks.c
+++ b/tools/perf/util/perf-hooks.c
@@ -25,8 +25,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;
@@ -69,7 +69,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;
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index b8e0967c5c21..d1e4a55cf418 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -91,7 +91,7 @@ int init_probe_symbol_maps(bool user_only)
 	}
 out:
 	if (ret < 0)
-		pr_warning("Failed to init vmlinux path.\n");
+		pr_warn("Failed to init vmlinux path.\n");
 	return ret;
 }
 
@@ -240,9 +240,9 @@ static bool kprobe_warn_out_range(const char *symbol, unsigned long address)
 						false, false);
 
 	if (ret == 0 && etext_addr < address)
-		pr_warning("%s is out of .text, skip it.\n", symbol);
+		pr_warn("%s is out of .text, skip it.\n", symbol);
 	else if (kprobe_blacklist__listed(address))
-		pr_warning("%s is blacklisted function, skip it.\n", symbol);
+		pr_warn("%s is blacklisted function, skip it.\n", symbol);
 	else
 		return false;
 
@@ -475,12 +475,12 @@ static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
 	nsinfo__mountns_enter(nsi, &nsc);
 	ret = debuginfo__new(path);
 	if (!ret && !silent) {
-		pr_warning("The %s file has no debug information.\n", path);
+		pr_warn("The %s file has no debug information.\n", path);
 		if (!module || !strtailcmp(path, ".ko"))
-			pr_warning("Rebuild with CONFIG_DEBUG_INFO=y, ");
+			pr_warn("Rebuild with CONFIG_DEBUG_INFO=y, ");
 		else
-			pr_warning("Rebuild with -g, ");
-		pr_warning("or install an appropriate debuginfo package.\n");
+			pr_warn("Rebuild with -g, ");
+		pr_warn("or install an appropriate debuginfo package.\n");
 	}
 	nsinfo__mountns_exit(&nsc);
 	return ret;
@@ -658,7 +658,7 @@ post_process_offline_probe_trace_events(struct probe_trace_event *tevs,
 	/* Prepare a map for offline binary */
 	map = dso__new_map(pathname);
 	if (!map || get_text_start_address(pathname, &stext, NULL) < 0) {
-		pr_warning("Failed to get ELF symbols for %s\n", pathname);
+		pr_warn("Failed to get ELF symbols for %s\n", pathname);
 		return -EINVAL;
 	}
 
@@ -716,7 +716,7 @@ post_process_module_probe_trace_events(struct probe_trace_event *tevs,
 
 	map = get_target_map(module, NULL, false);
 	if (!map || debuginfo__get_text_offset(dinfo, &text_offs, true) < 0) {
-		pr_warning("Failed to get ELF symbols for %s\n", module);
+		pr_warn("Failed to get ELF symbols for %s\n", module);
 		return -EINVAL;
 	}
 
@@ -755,7 +755,7 @@ post_process_kernel_probe_trace_events(struct probe_trace_event *tevs,
 
 	reloc_sym = kernel_get_ref_reloc_sym();
 	if (!reloc_sym) {
-		pr_warning("Relocated base symbol is not found!\n");
+		pr_warn("Relocated base symbol is not found!\n");
 		return -EINVAL;
 	}
 
@@ -865,14 +865,14 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
 	debuginfo__delete(dinfo);
 
 	if (ntevs == 0)	{	/* No error but failed to find probe point. */
-		pr_warning("Probe point '%s' not found.\n",
-			   synthesize_perf_probe_point(&pev->point));
+		pr_warn("Probe point '%s' not found.\n",
+			synthesize_perf_probe_point(&pev->point));
 		return -ENOENT;
 	} else if (ntevs < 0) {
 		/* Error path : ntevs < 0 */
 		pr_debug("An error occurred in debuginfo analysis (%d).\n", ntevs);
 		if (ntevs == -EBADF)
-			pr_warning("Warning: No dwarf info found in the vmlinux - "
+			pr_warn("Warning: No dwarf info found in the vmlinux - "
 				"please rebuild kernel with CONFIG_DEBUG_INFO=y.\n");
 		if (!need_dwarf) {
 			pr_debug("Trying to use symbols.\n");
@@ -907,8 +907,8 @@ static int __show_one_line(FILE *fp, int l, bool skip, bool show_num)
 	return 1;
 error:
 	if (ferror(fp)) {
-		pr_warning("File read error: %s\n",
-			   str_error_r(errno, sbuf, sizeof(sbuf)));
+		pr_warn("File read error: %s\n",
+			str_error_r(errno, sbuf, sizeof(sbuf)));
 		return -1;
 	}
 	return 0;
@@ -918,7 +918,7 @@ static int _show_one_line(FILE *fp, int l, bool skip, bool show_num)
 {
 	int rv = __show_one_line(fp, l, skip, show_num);
 	if (rv == 0) {
-		pr_warning("Source file is shorter than expected.\n");
+		pr_warn("Source file is shorter than expected.\n");
 		rv = -1;
 	}
 	return rv;
@@ -957,10 +957,10 @@ static int __show_line_range(struct line_range *lr, const char *module,
 	}
 	debuginfo__delete(dinfo);
 	if (ret == 0 || ret == -ENOENT) {
-		pr_warning("Specified source line is not found.\n");
+		pr_warn("Specified source line is not found.\n");
 		return -ENOENT;
 	} else if (ret < 0) {
-		pr_warning("Debuginfo analysis failed.\n");
+		pr_warn("Debuginfo analysis failed.\n");
 		return ret;
 	}
 
@@ -973,7 +973,7 @@ static int __show_line_range(struct line_range *lr, const char *module,
 		free(tmp);
 
 	if (ret < 0) {
-		pr_warning("Failed to find source file path.\n");
+		pr_warn("Failed to find source file path.\n");
 		return ret;
 	}
 
@@ -987,8 +987,8 @@ static int __show_line_range(struct line_range *lr, const char *module,
 
 	fp = fopen(lr->path, "r");
 	if (fp == NULL) {
-		pr_warning("Failed to open %s: %s\n", lr->path,
-			   str_error_r(errno, sbuf, sizeof(sbuf)));
+		pr_warn("Failed to open %s: %s\n", lr->path,
+			str_error_r(errno, sbuf, sizeof(sbuf)));
 		return -errno;
 	}
 	/* Skip to starting line number */
@@ -1069,7 +1069,7 @@ static int show_available_vars_at(struct debuginfo *dinfo,
 			pr_err("Failed to find the address of %s\n", buf);
 			ret = -ENOENT;
 		} else
-			pr_warning("Debuginfo analysis failed.\n");
+			pr_warn("Debuginfo analysis failed.\n");
 		goto end;
 	}
 
@@ -1150,7 +1150,7 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
 				struct probe_trace_event **tevs __maybe_unused)
 {
 	if (perf_probe_event_need_dwarf(pev)) {
-		pr_warning("Debuginfo-analysis is not supported.\n");
+		pr_warn("Debuginfo-analysis is not supported.\n");
 		return -ENOSYS;
 	}
 
@@ -1162,7 +1162,7 @@ int show_line_range(struct line_range *lr __maybe_unused,
 		    struct nsinfo *nsi __maybe_unused,
 		    bool user __maybe_unused)
 {
-	pr_warning("Debuginfo-analysis is not supported.\n");
+	pr_warn("Debuginfo-analysis is not supported.\n");
 	return -ENOSYS;
 }
 
@@ -1170,7 +1170,7 @@ int show_available_vars(struct perf_probe_event *pevs __maybe_unused,
 			int npevs __maybe_unused,
 			struct strfilter *filter __maybe_unused)
 {
-	pr_warning("Debuginfo-analysis is not supported.\n");
+	pr_warn("Debuginfo-analysis is not supported.\n");
 	return -ENOSYS;
 }
 #endif
@@ -2620,11 +2620,11 @@ static int get_new_event_name(char *buf, size_t len, const char *base,
 		goto out;
 
 	if (!allow_suffix) {
-		pr_warning("Error: event \"%s\" already exists.\n"
-			   " Hint: Remove existing event by 'perf probe -d'\n"
-			   "       or force duplicates by 'perf probe -f'\n"
-			   "       or set 'force=yes' in BPF source.\n",
-			   buf);
+		pr_warn("Error: event \"%s\" already exists.\n"
+			" Hint: Remove existing event by 'perf probe -d'\n"
+			"       or force duplicates by 'perf probe -f'\n"
+			"       or set 'force=yes' in BPF source.\n",
+			buf);
 		ret = -EEXIST;
 		goto out;
 	}
@@ -2640,7 +2640,7 @@ static int get_new_event_name(char *buf, size_t len, const char *base,
 			break;
 	}
 	if (i == MAX_EVENT_INDEX) {
-		pr_warning("Too many events are on the same function.\n");
+		pr_warn("Too many events are on the same function.\n");
 		ret = -ERANGE;
 	}
 
@@ -2649,8 +2649,8 @@ static int get_new_event_name(char *buf, size_t len, const char *base,
 
 	/* Final validation */
 	if (ret >= 0 && !is_c_func_name(buf)) {
-		pr_warning("Internal error: \"%s\" is an invalid event name.\n",
-			   buf);
+		pr_warn("Internal error: \"%s\" is an invalid event name.\n",
+			buf);
 		ret = -EINVAL;
 	}
 
@@ -2665,9 +2665,9 @@ static void warn_uprobe_event_compat(struct probe_trace_event *tev)
 	struct probe_trace_point *tp = &tev->point;
 
 	if (tp->ref_ctr_offset && !uprobe_ref_ctr_is_supported()) {
-		pr_warning("A semaphore is associated with %s:%s and "
-			   "seems your kernel doesn't support it.\n",
-			   tev->group, tev->event);
+		pr_warn("A semaphore is associated with %s:%s and "
+			"seems your kernel doesn't support it.\n",
+			tev->group, tev->event);
 	}
 
 	/* Old uprobe event doesn't support memory dereference */
@@ -2676,9 +2676,9 @@ static void warn_uprobe_event_compat(struct probe_trace_event *tev)
 
 	for (i = 0; i < tev->nargs; i++)
 		if (strglobmatch(tev->args[i].value, "[$@+-]*")) {
-			pr_warning("Please upgrade your kernel to at least "
-				   "3.14 to have access to feature %s\n",
-				   tev->args[i].value);
+			pr_warn("Please upgrade your kernel to at least "
+				"3.14 to have access to feature %s\n",
+				tev->args[i].value);
 			break;
 		}
 out:
@@ -2809,7 +2809,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
 		if (!cache ||
 		    probe_cache__add_entry(cache, pev, tevs, ntevs) < 0 ||
 		    probe_cache__commit(cache) < 0)
-			pr_warning("Failed to add event to probe cache\n");
+			pr_warn("Failed to add event to probe cache\n");
 		probe_cache__delete(cache);
 	}
 
@@ -2924,7 +2924,7 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev,
 			(!pp->retprobe || kretprobe_offset_is_supported())) {
 		reloc_sym = kernel_get_ref_reloc_sym();
 		if (!reloc_sym) {
-			pr_warning("Relocated base symbol is not found!\n");
+			pr_warn("Relocated base symbol is not found!\n");
 			ret = -EINVAL;
 			goto out;
 		}
@@ -2945,14 +2945,14 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev,
 		tev = (*tevs) + ret;
 		tp = &tev->point;
 		if (ret == num_matched_functions) {
-			pr_warning("Too many symbols are listed. Skip it.\n");
+			pr_warn("Too many symbols are listed. Skip it.\n");
 			break;
 		}
 		ret++;
 
 		if (pp->offset > sym->end - sym->start) {
-			pr_warning("Offset %ld is bigger than the size of %s\n",
-				   pp->offset, sym->name);
+			pr_warn("Offset %ld is bigger than the size of %s\n",
+				pp->offset, sym->name);
 			ret = -ENOENT;
 			goto err_out;
 		}
@@ -3323,7 +3323,7 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
 		} else
 			ret = convert_exec_to_group(pev->target, &pev->group);
 		if (ret != 0) {
-			pr_warning("Failed to make a group name.\n");
+			pr_warn("Failed to make a group name.\n");
 			return ret;
 		}
 	}
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index d13db55a2feb..803ba506a975 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -42,31 +42,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)));
 	}
 }
 
@@ -238,8 +238,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);
@@ -276,8 +276,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;
 }
 
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 505905fc21c5..2e143c205166 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -260,8 +260,8 @@ static int convert_variable_location(Dwarf_Die *vr_die, Dwarf_Addr addr,
 	regs = get_dwarf_regstr(regn, machine);
 	if (!regs) {
 		/* This should be a bug in DWARF or this tool */
-		pr_warning("Mapping for the register number %u "
-			   "missing on this architecture.\n", regn);
+		pr_warn("Mapping for the register number %u "
+			"missing on this architecture.\n", regn);
 		return -ENOTSUP;
 	}
 
@@ -313,8 +313,8 @@ static int convert_variable_type(Dwarf_Die *vr_die,
 	}
 
 	if (die_get_real_type(vr_die, &type) == NULL) {
-		pr_warning("Failed to get a type information of %s.\n",
-			   dwarf_diename(vr_die));
+		pr_warn("Failed to get a type information of %s.\n",
+			dwarf_diename(vr_die));
 		return -ENOENT;
 	}
 
@@ -326,14 +326,13 @@ static int convert_variable_type(Dwarf_Die *vr_die,
 		ret = dwarf_tag(&type);
 		if (ret != DW_TAG_pointer_type &&
 		    ret != DW_TAG_array_type) {
-			pr_warning("Failed to cast into string: "
-				   "%s(%s) is not a pointer nor array.\n",
-				   dwarf_diename(vr_die), dwarf_diename(&type));
+			pr_warn("Failed to cast into string: "
+				"%s(%s) is not a pointer nor array.\n",
+				dwarf_diename(vr_die), dwarf_diename(&type));
 			return -EINVAL;
 		}
 		if (die_get_real_type(&type, &type) == NULL) {
-			pr_warning("Failed to get a type"
-				   " information.\n");
+			pr_warn("Failed to get a type information.\n");
 			return -ENOENT;
 		}
 		if (ret == DW_TAG_pointer_type) {
@@ -342,16 +341,16 @@ static int convert_variable_type(Dwarf_Die *vr_die,
 			/* Add new reference with offset +0 */
 			*ref_ptr = zalloc(sizeof(struct probe_trace_arg_ref));
 			if (*ref_ptr == NULL) {
-				pr_warning("Out of memory error\n");
+				pr_warn("Out of memory error\n");
 				return -ENOMEM;
 			}
 			(*ref_ptr)->user_access = user_access;
 		}
 		if (!die_compare_name(&type, "char") &&
 		    !die_compare_name(&type, "unsigned char")) {
-			pr_warning("Failed to cast into string: "
-				   "%s is not (unsigned) char *.\n",
-				   dwarf_diename(vr_die));
+			pr_warn("Failed to cast into string: "
+				"%s is not (unsigned) char *.\n",
+				dwarf_diename(vr_die));
 			return -EINVAL;
 		}
 		tvar->type = strdup(cast);
@@ -387,8 +386,8 @@ static int convert_variable_type(Dwarf_Die *vr_die,
 	if (ret < 0 || ret >= 16) {
 		if (ret >= 16)
 			ret = -E2BIG;
-		pr_warning("Failed to convert variable type: %s\n",
-			   str_error_r(-ret, sbuf, sizeof(sbuf)));
+		pr_warn("Failed to convert variable type: %s\n",
+			str_error_r(-ret, sbuf, sizeof(sbuf)));
 		return ret;
 	}
 	tvar->type = strdup(buf);
@@ -409,7 +408,7 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 
 	pr_debug("converting %s in %s\n", field->name, varname);
 	if (die_get_real_type(vr_die, &type) == NULL) {
-		pr_warning("Failed to get the type of %s.\n", varname);
+		pr_warn("Failed to get the type of %s.\n", varname);
 		return -ENOENT;
 	}
 	pr_debug2("Var real type: %s (%x)\n", dwarf_diename(&type),
@@ -422,7 +421,7 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 		memcpy(die_mem, &type, sizeof(*die_mem));
 		/* Get the type of this array */
 		if (die_get_real_type(&type, &type) == NULL) {
-			pr_warning("Failed to get the type of %s.\n", varname);
+			pr_warn("Failed to get the type of %s.\n", varname);
 			return -ENOENT;
 		}
 		pr_debug2("Array real type: %s (%x)\n", dwarf_diename(&type),
@@ -448,14 +447,14 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 		}
 		/* Get the type pointed by this pointer */
 		if (die_get_real_type(&type, &type) == NULL) {
-			pr_warning("Failed to get the type of %s.\n", varname);
+			pr_warn("Failed to get the type of %s.\n", varname);
 			return -ENOENT;
 		}
 		/* Verify it is a data structure  */
 		tag = dwarf_tag(&type);
 		if (tag != DW_TAG_structure_type && tag != DW_TAG_union_type) {
-			pr_warning("%s is not a data structure nor a union.\n",
-				   varname);
+			pr_warn("%s is not a data structure nor a union.\n",
+				varname);
 			return -EINVAL;
 		}
 
@@ -469,8 +468,8 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 	} else {
 		/* Verify it is a data structure  */
 		if (tag != DW_TAG_structure_type && tag != DW_TAG_union_type) {
-			pr_warning("%s is not a data structure nor a union.\n",
-				   varname);
+			pr_warn("%s is not a data structure nor a union.\n",
+				varname);
 			return -EINVAL;
 		}
 		if (field->name[0] == '[') {
@@ -485,15 +484,14 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 			return -EINVAL;
 		}
 		if (!ref) {
-			pr_warning("Structure on a register is not "
-				   "supported yet.\n");
+			pr_warn("Structure on a register is not supported yet.\n");
 			return -ENOTSUP;
 		}
 	}
 
 	if (die_find_member(&type, field->name, die_mem) == NULL) {
-		pr_warning("%s(type:%s) has no member %s.\n", varname,
-			   dwarf_diename(&type), field->name);
+		pr_warn("%s(type:%s) has no member %s.\n", varname,
+			dwarf_diename(&type), field->name);
 		return -EINVAL;
 	}
 
@@ -503,8 +501,8 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 	} else {
 		ret = die_get_data_member_location(die_mem, &offs);
 		if (ret < 0) {
-			pr_warning("Failed to get the offset of %s.\n",
-				   field->name);
+			pr_warn("Failed to get the offset of %s.\n",
+				field->name);
 			return ret;
 		}
 	}
@@ -587,8 +585,8 @@ static int find_variable(Dwarf_Die *sc_die, struct probe_finder *pf)
 		/* Search again in global variables */
 		if (!die_find_variable_at(&pf->cu_die, pf->pvar->var,
 						0, &vr_die)) {
-			pr_warning("Failed to find '%s' in this function.\n",
-				   pf->pvar->var);
+			pr_warn("Failed to find '%s' in this function.\n",
+				pf->pvar->var);
 			ret = -ENOENT;
 		}
 	}
@@ -610,18 +608,18 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
 
 	/* Verify the address is correct */
 	if (dwarf_entrypc(sp_die, &eaddr) != 0) {
-		pr_warning("Failed to get entry address of %s\n",
-			   dwarf_diename(sp_die));
+		pr_warn("Failed to get entry address of %s\n",
+			dwarf_diename(sp_die));
 		return -ENOENT;
 	}
 	if (dwarf_highpc(sp_die, &highaddr) != 0) {
-		pr_warning("Failed to get end address of %s\n",
-			   dwarf_diename(sp_die));
+		pr_warn("Failed to get end address of %s\n",
+			dwarf_diename(sp_die));
 		return -ENOENT;
 	}
 	if (paddr > highaddr) {
-		pr_warning("Offset specified is greater than size of %s\n",
-			   dwarf_diename(sp_die));
+		pr_warn("Offset specified is greater than size of %s\n",
+			dwarf_diename(sp_die));
 		return -EINVAL;
 	}
 
@@ -630,8 +628,8 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
 		/* Try to get the symbol name from symtab */
 		symbol = dwfl_module_addrsym(mod, paddr, &sym, NULL);
 		if (!symbol) {
-			pr_warning("Failed to find symbol at 0x%lx\n",
-				   (unsigned long)paddr);
+			pr_warn("Failed to find symbol at 0x%lx\n",
+				(unsigned long)paddr);
 			return -ENOENT;
 		}
 		eaddr = sym.st_value;
@@ -645,8 +643,8 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
 	/* Return probe must be on the head of a subprogram */
 	if (retprobe) {
 		if (eaddr != paddr) {
-			pr_warning("Failed to find \"%s%%return\",\n"
-				   " because %s is an inlined function and"
+			pr_warn("Failed to find \"%s%%return\",\n"
+				" because %s is an inlined function and"
 				   " has no return point.\n", function,
 				   function);
 			return -EINVAL;
@@ -674,12 +672,11 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct probe_finder *pf)
 	if (!die_is_func_def(sc_die)) {
 		if (!die_find_realfunc(&pf->cu_die, pf->addr, &pf->sp_die)) {
 			if (die_find_tailfunc(&pf->cu_die, pf->addr, &pf->sp_die)) {
-				pr_warning("Ignoring tail call from %s\n",
-						dwarf_diename(&pf->sp_die));
+				pr_warn("Ignoring tail call from %s\n",
+					dwarf_diename(&pf->sp_die));
 				return 0;
 			} else {
-				pr_warning("Failed to find probe point in any "
-					   "functions.\n");
+				pr_warn("Failed to find probe point in any functions.\n");
 				return -ENOENT;
 			}
 		}
@@ -697,8 +694,8 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct probe_finder *pf)
 		if ((dwarf_cfi_addrframe(pf->cfi_eh, pf->addr, &frame) != 0 &&
 		     (dwarf_cfi_addrframe(pf->cfi_dbg, pf->addr, &frame) != 0)) ||
 		    dwarf_frame_cfa(frame, &pf->fb_ops, &nops) != 0) {
-			pr_warning("Failed to get call frame on 0x%jx\n",
-				   (uintmax_t)pf->addr);
+			pr_warn("Failed to get call frame on 0x%jx\n",
+				(uintmax_t)pf->addr);
 			free(frame);
 			return -ENOENT;
 		}
@@ -786,7 +783,7 @@ static int probe_point_line_walker(const char *fname, int lineno,
 	pf->addr = addr;
 	sc_die = find_best_scope(pf, &die_mem);
 	if (!sc_die) {
-		pr_warning("Failed to find scope of probe point.\n");
+		pr_warn("Failed to find scope of probe point.\n");
 		return -ENOENT;
 	}
 
@@ -815,8 +812,8 @@ static int find_lazy_match_lines(struct intlist *list,
 
 	fp = fopen(fname, "r");
 	if (!fp) {
-		pr_warning("Failed to open %s: %s\n", fname,
-			   str_error_r(errno, sbuf, sizeof(sbuf)));
+		pr_warn("Failed to open %s: %s\n", fname,
+			str_error_r(errno, sbuf, sizeof(sbuf)));
 		return -errno;
 	}
 
@@ -859,7 +856,7 @@ static int probe_point_lazy_walker(const char *fname, int lineno,
 	pf->lno = lineno;
 	sc_die = find_best_scope(pf, &die_mem);
 	if (!sc_die) {
-		pr_warning("Failed to find scope of probe point.\n");
+		pr_warn("Failed to find scope of probe point.\n");
 		return -ENOENT;
 	}
 
@@ -884,7 +881,7 @@ static int find_probe_point_lazy(Dwarf_Die *sp_die, struct probe_finder *pf)
 		comp_dir = cu_get_comp_dir(&pf->cu_die);
 		ret = get_real_path(pf->fname, comp_dir, &fpath);
 		if (ret < 0) {
-			pr_warning("Failed to find source file path.\n");
+			pr_warn("Failed to find source file path.\n");
 			return ret;
 		}
 
@@ -943,8 +940,8 @@ static int probe_point_inline_cb(Dwarf_Die *in_die, void *data)
 	else {
 		/* Get probe address */
 		if (dwarf_entrypc(in_die, &addr) != 0) {
-			pr_warning("Failed to get entry address of %s.\n",
-				   dwarf_diename(in_die));
+			pr_warn("Failed to get entry address of %s.\n",
+				dwarf_diename(in_die));
 			return -ENOENT;
 		}
 		if (addr == 0) {
@@ -1257,8 +1254,7 @@ static int add_probe_trace_event(Dwarf_Die *sc_die, struct probe_finder *pf)
 
 	/* Check number of tevs */
 	if (tf->ntevs == tf->max_tevs) {
-		pr_warning("Too many( > %d) probe point found.\n",
-			   tf->max_tevs);
+		pr_warn("Too many( > %d) probe point found.\n", tf->max_tevs);
 		return -ERANGE;
 	}
 	tev = &tf->tevs[tf->ntevs++];
@@ -1418,7 +1414,7 @@ static int add_available_vars(Dwarf_Die *sc_die, struct probe_finder *pf)
 
 	/* Check number of tevs */
 	if (af->nvls == af->max_vls) {
-		pr_warning("Too many( > %d) probe point found.\n", af->max_vls);
+		pr_warn("Too many( > %d) probe point found.\n", af->max_vls);
 		return -ERANGE;
 	}
 	vl = &af->vls[af->nvls++];
@@ -1544,8 +1540,8 @@ int debuginfo__find_probe_point(struct debuginfo *dbg, unsigned long addr,
 		addr += baseaddr;
 	/* Find cu die */
 	if (!dwarf_addrdie(dbg->dbg, (Dwarf_Addr)addr, &cudie)) {
-		pr_warning("Failed to find debug information for address %lx\n",
-			   addr);
+		pr_warn("Failed to find debug information for address %lx\n",
+			addr);
 		ret = -EINVAL;
 		goto end;
 	}
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index 286fe816c0f3..4843c868f74a 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -233,11 +233,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;
 		}
@@ -247,10 +247,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;
 	}
 
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index e9e4a04f15db..c3c950bba720 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -238,7 +238,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");
 	}
 
 	/*
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 6ccf6f6d09df..d770de66ceaf 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -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;
 	}
 
diff --git a/tools/perf/util/thread-stack.c b/tools/perf/util/thread-stack.c
index cd8a948d03ec..2e21f88746d1 100644
--- a/tools/perf/util/thread-stack.c
+++ b/tools/perf/util/thread-stack.c
@@ -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;
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index c9bfe4696943..e0dea5b46931 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -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;
 }
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 5d6bfc70b210..9433bbabcbda 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -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);
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index ebdbb056510c..5ecb77f289b7 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -341,11 +341,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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH 32/32] checkpatch: Drop pr_warning check
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (30 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 31/32] tools perf: " Kefeng Wang
@ 2019-09-20  6:25 ` Kefeng Wang
  2019-09-20  9:29 ` [PATCH 00/32] Kill pr_warning in the whole linux code Sergey Senozhatsky
  2019-10-02  8:55 ` Petr Mladek
  33 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:25 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel
  Cc: wangkefeng.wang

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

Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 scripts/checkpatch.pl | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 93a7edfe0f05..56d710274a15 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4098,15 +4098,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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* Re: [PATCH 18/32] platform/x86: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 18/32] platform/x86: " Kefeng Wang
@ 2019-09-20  6:26   ` Andy Shevchenko
  2019-09-20  6:31     ` Kefeng Wang
  2019-09-20 11:12     ` [PATCH v2 1/3] platform/x86: eeepc-laptop: " Kefeng Wang
  0 siblings, 2 replies; 68+ messages in thread
From: Andy Shevchenko @ 2019-09-20  6:26 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann,
	Linux Kernel Mailing List, Corentin Chary, Darren Hart,
	Andy Shevchenko

On Fri, Sep 20, 2019 at 9:10 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> 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.
>

Please, split on three patches (per driver).

>  drivers/platform/x86/asus-laptop.c    |  2 +-
>  drivers/platform/x86/eeepc-laptop.c   |  2 +-
>  drivers/platform/x86/intel_oaktrail.c | 10 +++++-----

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 18/32] platform/x86: Use pr_warn instead of pr_warning
  2019-09-20  6:26   ` Andy Shevchenko
@ 2019-09-20  6:31     ` Kefeng Wang
  2019-09-20 11:12     ` [PATCH v2 1/3] platform/x86: eeepc-laptop: " Kefeng Wang
  1 sibling, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20  6:31 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann,
	Linux Kernel Mailing List, Corentin Chary, Darren Hart,
	Andy Shevchenko


On 2019/9/20 14:26, Andy Shevchenko wrote:
> On Fri, Sep 20, 2019 at 9:10 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> 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.
>>
> Please, split on three patches (per driver).
ok, will send v2, thanks.
>
>>  drivers/platform/x86/asus-laptop.c    |  2 +-
>>  drivers/platform/x86/eeepc-laptop.c   |  2 +-
>>  drivers/platform/x86/intel_oaktrail.c | 10 +++++-----


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 11/32] clocksource: samsung_pwm_timer: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 11/32] clocksource: samsung_pwm_timer: " Kefeng Wang
@ 2019-09-20  8:25   ` Daniel Lezcano
  0 siblings, 0 replies; 68+ messages in thread
From: Daniel Lezcano @ 2019-09-20  8:25 UTC (permalink / raw)
  To: Kefeng Wang, Joe Perches, Andrew Morton, Ingo Molnar,
	David S. Miller, Arnaldo Carvalho de Melo, Andy Whitcroft,
	Peter Zijlstra, Alexei Starovoitov, Daniel Borkmann,
	Greg Kroah-Hartman, Sergey Senozhatsky, Petr Mladek,
	Arnd Bergmann, linux-kernel

On 20/09/2019 08:25, Kefeng Wang wrote:
> 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: Daniel Lezcano <daniel.lezcano@linaro.org>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---
>  drivers/clocksource/samsung_pwm_timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
> index 895f53eb5771..0274219e1720 100644
> --- a/drivers/clocksource/samsung_pwm_timer.c
> +++ b/drivers/clocksource/samsung_pwm_timer.c
> @@ -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;
>  		}
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 17/32] oprofile: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 17/32] oprofile: " Kefeng Wang
@ 2019-09-20  9:18   ` Robert Richter
  0 siblings, 0 replies; 68+ messages in thread
From: Robert Richter @ 2019-09-20  9:18 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel

On 20.09.19 14:25:29, Kefeng Wang wrote:
> 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: Robert Richter <rric@kernel.org>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  drivers/oprofile/oprofile_perf.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Acked-by: Robert Richter <rric@kernel.org>

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 07/32] x86: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 07/32] x86: " Kefeng Wang
@ 2019-09-20  9:28   ` Robert Richter
  2019-09-20 11:57     ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Robert Richter @ 2019-09-20  9:28 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Borislav Petkov, H. Peter Anvin, Darren Hart, Andy Shevchenko

On 20.09.19 14:25:19, Kefeng Wang wrote:
> 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 <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Robert Richter <rric@kernel.org>
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: Andy Shevchenko <andy@infradead.org>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  arch/x86/kernel/amd_gart_64.c          | 11 ++++---
>  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 ++--

For oprofile:

Acked-by: Robert Richter <rric@kernel.org>

But see below:

>  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(+), 64 deletions(-)
> 
> diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c
> index a585ea6f686a..53545c9c7cad 100644
> --- a/arch/x86/kernel/amd_gart_64.c
> +++ b/arch/x86/kernel/amd_gart_64.c

> @@ -665,7 +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"
> +	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU\n"
>  	       "falling back to iommu=soft.\n");

This indentation should be fixed too, while at it.

>  	return -1;
>  }

-Robert

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (31 preceding siblings ...)
  2019-09-20  6:25 ` [PATCH 32/32] checkpatch: Drop pr_warning check Kefeng Wang
@ 2019-09-20  9:29 ` Sergey Senozhatsky
  2019-10-02  8:55 ` Petr Mladek
  33 siblings, 0 replies; 68+ messages in thread
From: Sergey Senozhatsky @ 2019-09-20  9:29 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel

On (09/20/19 14:25), Kefeng Wang wrote:
> There are pr_warning and pr_warng to show WARNING level message,
> most of the code using pr_warn, number based on next-20190919,

Looks good to me.

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH v2 1/3] platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning
  2019-09-20  6:26   ` Andy Shevchenko
  2019-09-20  6:31     ` Kefeng Wang
@ 2019-09-20 11:12     ` Kefeng Wang
  2019-09-20 11:12       ` [PATCH v2 2/3] platform/x86: asus-laptop: " Kefeng Wang
  2019-09-20 11:12       ` [PATCH v2 3/3] platform/x86: intel_oaktrail: " Kefeng Wang
  1 sibling, 2 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20 11:12 UTC (permalink / raw)
  To: Joe Perches, Arnd Bergmann, Andrew Morton, Ingo Molnar,
	David S. Miller, Arnaldo Carvalho de Melo, Andy Whitcroft,
	Peter Zijlstra, Alexei Starovoitov, Daniel Borkmann,
	Greg Kroah-Hartman, Sergey Senozhatsky, Petr Mladek,
	linux-kernel
  Cc: Kefeng Wang, Corentin Chary, Darren Hart, Andy Shevchenko,
	Andy Shevchenko

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 <corentin.chary@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/platform/x86/eeepc-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index f3f74a9c109e..776868d5e458 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -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


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH v2 2/3] platform/x86: asus-laptop: Use pr_warn instead of pr_warning
  2019-09-20 11:12     ` [PATCH v2 1/3] platform/x86: eeepc-laptop: " Kefeng Wang
@ 2019-09-20 11:12       ` Kefeng Wang
  2019-09-20 11:12       ` [PATCH v2 3/3] platform/x86: intel_oaktrail: " Kefeng Wang
  1 sibling, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20 11:12 UTC (permalink / raw)
  To: Joe Perches, Arnd Bergmann, Andrew Morton, Ingo Molnar,
	David S. Miller, Arnaldo Carvalho de Melo, Andy Whitcroft,
	Peter Zijlstra, Alexei Starovoitov, Daniel Borkmann,
	Greg Kroah-Hartman, Sergey Senozhatsky, Petr Mladek,
	linux-kernel
  Cc: Kefeng Wang, Corentin Chary, Darren Hart, Andy Shevchenko,
	Andy Shevchenko

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 <corentin.chary@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/platform/x86/asus-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 472af7edf0af..ca65e1039f92 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -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


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-20 11:12     ` [PATCH v2 1/3] platform/x86: eeepc-laptop: " Kefeng Wang
  2019-09-20 11:12       ` [PATCH v2 2/3] platform/x86: asus-laptop: " Kefeng Wang
@ 2019-09-20 11:12       ` Kefeng Wang
  2019-09-25 15:04         ` Andy Shevchenko
  1 sibling, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20 11:12 UTC (permalink / raw)
  To: Joe Perches, Arnd Bergmann, Andrew Morton, Ingo Molnar,
	David S. Miller, Arnaldo Carvalho de Melo, Andy Whitcroft,
	Peter Zijlstra, Alexei Starovoitov, Daniel Borkmann,
	Greg Kroah-Hartman, Sergey Senozhatsky, Petr Mladek,
	linux-kernel
  Cc: Kefeng Wang, Corentin Chary, Darren Hart, Andy Shevchenko,
	Andy Shevchenko

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 <corentin.chary@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/platform/x86/intel_oaktrail.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
index 3c0438ba385e..1a09a75bd16d 100644
--- a/drivers/platform/x86/intel_oaktrail.c
+++ b/drivers/platform/x86/intel_oaktrail.c
@@ -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


^ permalink raw reply related	[flat|nested] 68+ messages in thread

* Re: [PATCH 07/32] x86: Use pr_warn instead of pr_warning
  2019-09-20  9:28   ` Robert Richter
@ 2019-09-20 11:57     ` Kefeng Wang
  2019-09-20 15:28       ` Joe Perches
  0 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-20 11:57 UTC (permalink / raw)
  To: Robert Richter
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Borislav Petkov, H. Peter Anvin, Darren Hart, Andy Shevchenko


On 2019/9/20 17:28, Robert Richter wrote:
> On 20.09.19 14:25:19, Kefeng Wang wrote:
>> 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 <mingo@redhat.com>
>> Cc: Borislav Petkov <bp@alien8.de>
>> Cc: "H. Peter Anvin" <hpa@zytor.com>
>> Cc: Robert Richter <rric@kernel.org>
>> Cc: Darren Hart <dvhart@infradead.org>
>> Cc: Andy Shevchenko <andy@infradead.org>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>> ---
>>  arch/x86/kernel/amd_gart_64.c          | 11 ++++---
>>  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 ++--
> For oprofile:
>
> Acked-by: Robert Richter <rric@kernel.org>
>
> But see below:
>
>>  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(+), 64 deletions(-)
>>
>> diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c
>> index a585ea6f686a..53545c9c7cad 100644
>> --- a/arch/x86/kernel/amd_gart_64.c
>> +++ b/arch/x86/kernel/amd_gart_64.c
>> @@ -665,7 +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"
>> +	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU\n"
>>  	       "falling back to iommu=soft.\n");
> This indentation should be fixed too, while at it.
Will update later, thanks.
>
>>  	return -1;
>>  }
> -Robert
>
> .
>


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 25/32] trace: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 25/32] trace: " Kefeng Wang
@ 2019-09-20 13:26   ` Steven Rostedt
  0 siblings, 0 replies; 68+ messages in thread
From: Steven Rostedt @ 2019-09-20 13:26 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel

On Fri, 20 Sep 2019 14:25:37 +0800
Kefeng Wang <wangkefeng.wang@huawei.com> wrote:

> 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.

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> 
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  kernel/trace/trace_benchmark.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace_benchmark.c b/kernel/trace/trace_benchmark.c
> index 80e0b2aca703..2e9a4746ea85 100644
> --- a/kernel/trace/trace_benchmark.c
> +++ b/kernel/trace/trace_benchmark.c
> @@ -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);
>  	}
>  


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 07/32] x86: Use pr_warn instead of pr_warning
  2019-09-20 11:57     ` Kefeng Wang
@ 2019-09-20 15:28       ` Joe Perches
  2019-09-26  1:30         ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Joe Perches @ 2019-09-20 15:28 UTC (permalink / raw)
  To: Kefeng Wang, Robert Richter
  Cc: Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Borislav Petkov, H. Peter Anvin, Darren Hart, Andy Shevchenko

On Fri, 2019-09-20 at 19:57 +0800, Kefeng Wang wrote:
> On 2019/9/20 17:28, Robert Richter wrote:
> > On 20.09.19 14:25:19, Kefeng Wang wrote:
> > > 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.
[]
> > > diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c
[]
> > > @@ -665,7 +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"
> > > +	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU\n"
> > >  	       "falling back to iommu=soft.\n");
> > This indentation should be fixed too, while at it.
> Will update later, thanks.

trivia:

likely better as a single line output:

	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU - falling back to iommu=soft\n");



^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 02/32] arm64: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 02/32] arm64: " Kefeng Wang
@ 2019-09-20 15:57   ` Will Deacon
  0 siblings, 0 replies; 68+ messages in thread
From: Will Deacon @ 2019-09-20 15:57 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Mark Rutland, Catalin Marinas

On Fri, Sep 20, 2019 at 02:25:14PM +0800, Kefeng Wang wrote:
> 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: Will Deacon <will@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  arch/arm64/kernel/hw_breakpoint.c |  8 ++++----
>  arch/arm64/kernel/smp.c           | 11 +++++------
>  2 files changed, 9 insertions(+), 10 deletions(-)

Acked-by: Will Deacon <will@kernel.org>

Will

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 30/32] tools lib bpf: Renaming pr_warning to pr_warn
  2019-09-20  6:25 ` [PATCH 30/32] tools lib bpf: " Kefeng Wang
@ 2019-09-22 21:07   ` Andrii Nakryiko
  2019-09-23  8:20     ` Daniel Borkmann
  0 siblings, 1 reply; 68+ messages in thread
From: Andrii Nakryiko @ 2019-09-22 21:07 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, open list,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf

On Fri, Sep 20, 2019 at 10:06 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> 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.
>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Song Liu <songliubraving@fb.com>
> Cc: Yonghong Song <yhs@fb.com>
> Cc: bpf@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  tools/lib/bpf/btf.c             |  56 +--
>  tools/lib/bpf/btf_dump.c        |  20 +-
>  tools/lib/bpf/libbpf.c          | 652 ++++++++++++++++----------------
>  tools/lib/bpf/libbpf_internal.h |   2 +-
>  tools/lib/bpf/xsk.c             |   4 +-
>  5 files changed, 363 insertions(+), 371 deletions(-)
>

Thanks! This will allow to get rid of tons warnings from checkpatch.pl.

Alexei, Daniel, can we take this through bpf-next tree once it's open?

Acked-by: Andrii Nakryiko <andriin@fb.com>

[...]

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 30/32] tools lib bpf: Renaming pr_warning to pr_warn
  2019-09-22 21:07   ` Andrii Nakryiko
@ 2019-09-23  8:20     ` Daniel Borkmann
  2019-09-23 11:03       ` Petr Mladek
  0 siblings, 1 reply; 68+ messages in thread
From: Daniel Borkmann @ 2019-09-23  8:20 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Kefeng Wang, Joe Perches, Andrew Morton, Ingo Molnar,
	David S. Miller, Arnaldo Carvalho de Melo, Andy Whitcroft,
	Peter Zijlstra, Alexei Starovoitov, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, open list,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf

On Sun, Sep 22, 2019 at 02:07:21PM -0700, Andrii Nakryiko wrote:
> On Fri, Sep 20, 2019 at 10:06 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> >
> > 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.
> >
> > Cc: Alexei Starovoitov <ast@kernel.org>
> > Cc: Daniel Borkmann <daniel@iogearbox.net>
> > Cc: Martin KaFai Lau <kafai@fb.com>
> > Cc: Song Liu <songliubraving@fb.com>
> > Cc: Yonghong Song <yhs@fb.com>
> > Cc: bpf@vger.kernel.org
> > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> > ---
> >  tools/lib/bpf/btf.c             |  56 +--
> >  tools/lib/bpf/btf_dump.c        |  20 +-
> >  tools/lib/bpf/libbpf.c          | 652 ++++++++++++++++----------------
> >  tools/lib/bpf/libbpf_internal.h |   2 +-
> >  tools/lib/bpf/xsk.c             |   4 +-
> >  5 files changed, 363 insertions(+), 371 deletions(-)
> 
> Thanks! This will allow to get rid of tons warnings from checkpatch.pl.
> 
> Alexei, Daniel, can we take this through bpf-next tree once it's open?

I'd be fine with that, in fact, it probably should be in order to avoid
merge conflicts since pr_warn{ing}() is used all over the place in libbpf.

Kefeng would then however also need to include the original patch which
adds the pr_warn() to tools in the first place.

> Acked-by: Andrii Nakryiko <andriin@fb.com>
> 
> [...]

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 30/32] tools lib bpf: Renaming pr_warning to pr_warn
  2019-09-23  8:20     ` Daniel Borkmann
@ 2019-09-23 11:03       ` Petr Mladek
  2019-09-23 13:35         ` Daniel Borkmann
  0 siblings, 1 reply; 68+ messages in thread
From: Petr Mladek @ 2019-09-23 11:03 UTC (permalink / raw)
  To: Daniel Borkmann, Linus Torvalds
  Cc: Andrii Nakryiko, Arnd Bergmann, Andy Whitcroft, David S. Miller,
	Martin KaFai Lau, Song Liu, Yonghong Song, Sergey Senozhatsky,
	Kefeng Wang, Peter Zijlstra, Alexei Starovoitov, Andrew Morton,
	Greg Kroah-Hartman, Joe Perches, Arnaldo Carvalho de Melo,
	Ingo Molnar, bpf, open list

On Mon 2019-09-23 10:20:39, Daniel Borkmann wrote:
> On Sun, Sep 22, 2019 at 02:07:21PM -0700, Andrii Nakryiko wrote:
> > On Fri, Sep 20, 2019 at 10:06 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> > >
> > > 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.
> > >
> > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> > > ---
> > >  tools/lib/bpf/btf.c             |  56 +--
> > >  tools/lib/bpf/btf_dump.c        |  20 +-
> > >  tools/lib/bpf/libbpf.c          | 652 ++++++++++++++++----------------
> > >  tools/lib/bpf/libbpf_internal.h |   2 +-
> > >  tools/lib/bpf/xsk.c             |   4 +-
> > >  5 files changed, 363 insertions(+), 371 deletions(-)
> > 
> > Thanks! This will allow to get rid of tons warnings from checkpatch.pl.
> > 
> > Alexei, Daniel, can we take this through bpf-next tree once it's open?
> 
> I'd be fine with that, in fact, it probably should be in order to avoid
> merge conflicts since pr_warn{ing}() is used all over the place in libbpf.

The entire patchset modifies many files all over the tree.
This is from https://lkml.kernel.org/r/20190920062544.180997-1-wangkefeng.wang@huawei.com

    120 files changed, 882 insertions(+), 927 deletions(-)

Would it make sense to push everything at the end of the merge window
or for 5.4-rc2 after master settles down?

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 30/32] tools lib bpf: Renaming pr_warning to pr_warn
  2019-09-23 11:03       ` Petr Mladek
@ 2019-09-23 13:35         ` Daniel Borkmann
  2019-09-26  2:01           ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Daniel Borkmann @ 2019-09-23 13:35 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Linus Torvalds, Andrii Nakryiko, Arnd Bergmann, Andy Whitcroft,
	David S. Miller, Martin KaFai Lau, Song Liu, Yonghong Song,
	Sergey Senozhatsky, Kefeng Wang, Peter Zijlstra,
	Alexei Starovoitov, Andrew Morton, Greg Kroah-Hartman,
	Joe Perches, Arnaldo Carvalho de Melo, Ingo Molnar, bpf,
	open list

On Mon, Sep 23, 2019 at 01:03:06PM +0200, Petr Mladek wrote:
> On Mon 2019-09-23 10:20:39, Daniel Borkmann wrote:
> > On Sun, Sep 22, 2019 at 02:07:21PM -0700, Andrii Nakryiko wrote:
> > > On Fri, Sep 20, 2019 at 10:06 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> > > >
> > > > 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.
> > > >
> > > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> > > > ---
> > > >  tools/lib/bpf/btf.c             |  56 +--
> > > >  tools/lib/bpf/btf_dump.c        |  20 +-
> > > >  tools/lib/bpf/libbpf.c          | 652 ++++++++++++++++----------------
> > > >  tools/lib/bpf/libbpf_internal.h |   2 +-
> > > >  tools/lib/bpf/xsk.c             |   4 +-
> > > >  5 files changed, 363 insertions(+), 371 deletions(-)
> > > 
> > > Thanks! This will allow to get rid of tons warnings from checkpatch.pl.
> > > 
> > > Alexei, Daniel, can we take this through bpf-next tree once it's open?
> > 
> > I'd be fine with that, in fact, it probably should be in order to avoid
> > merge conflicts since pr_warn{ing}() is used all over the place in libbpf.
> 
> The entire patchset modifies many files all over the tree.
> This is from https://lkml.kernel.org/r/20190920062544.180997-1-wangkefeng.wang@huawei.com
> 
>     120 files changed, 882 insertions(+), 927 deletions(-)
> 
> Would it make sense to push everything at the end of the merge window
> or for 5.4-rc2 after master settles down?

If all over the tree it would probably make more sense for e.g. Andrew Morton to
pick it up if there are no other objections, and try to merge it during mentioned
time frame.

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-20 11:12       ` [PATCH v2 3/3] platform/x86: intel_oaktrail: " Kefeng Wang
@ 2019-09-25 15:04         ` Andy Shevchenko
  2019-09-26  1:28           ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Andy Shevchenko @ 2019-09-25 15:04 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Linux Kernel Mailing List, Corentin Chary, Darren Hart, Andy Shevchenko

On Fri, Sep 20, 2019 at 1:55 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> 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.
>

You have to send to proper mailing lists and people.
Don't spam the rest!

> Cc: Corentin Chary <corentin.chary@gmail.com>
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: Andy Shevchenko <andy@infradead.org>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  drivers/platform/x86/intel_oaktrail.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
> index 3c0438ba385e..1a09a75bd16d 100644
> --- a/drivers/platform/x86/intel_oaktrail.c
> +++ b/drivers/platform/x86/intel_oaktrail.c
> @@ -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
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 24/32] dma-debug: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 24/32] dma-debug: " Kefeng Wang
@ 2019-09-25 17:13   ` Christoph Hellwig
  2019-09-26  1:44     ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Christoph Hellwig @ 2019-09-25 17:13 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Christoph Hellwig, Marek Szyprowski, Robin Murphy

On Fri, Sep 20, 2019 at 02:25:36PM +0800, Kefeng Wang wrote:
> 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.

Please just send a script after -rc1 instead of sending all these
little patches.

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 04/32] riscv: Use pr_warn instead of pr_warning
  2019-09-20  6:25 ` [PATCH 04/32] riscv: " Kefeng Wang
@ 2019-09-25 21:05   ` Palmer Dabbelt
  0 siblings, 0 replies; 68+ messages in thread
From: Palmer Dabbelt @ 2019-09-25 21:05 UTC (permalink / raw)
  To: wangkefeng.wang
  Cc: joe, akpm, mingo, davem, acme, apw, peterz, ast, daniel, Greg KH,
	sergey.senozhatsky, pmladek, Arnd Bergmann, linux-kernel,
	wangkefeng.wang, Paul Walmsley, aou

On Thu, 19 Sep 2019 23:25:16 PDT (-0700), wangkefeng.wang@huawei.com wrote:
> 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: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  arch/riscv/kernel/module.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c
> index 70bb94ae61c5..b7401858d872 100644
> --- a/arch/riscv/kernel/module.c
> +++ b/arch/riscv/kernel/module.c
> @@ -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;
>  		}

Acked-by: Palmer Dabbelt <palmer@sifive.com>

I'm assuming this is going in through some other tree, LMK if that's not the 
case.

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-25 15:04         ` Andy Shevchenko
@ 2019-09-26  1:28           ` Kefeng Wang
  2019-09-26  5:48             ` Andy Shevchenko
  0 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-26  1:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Darren Hart, Andy Shevchenko


On 2019/9/25 23:04, Andy Shevchenko wrote:
> On Fri, Sep 20, 2019 at 1:55 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> 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.
>>
> You have to send to proper mailing lists and people.

Used get_maintainer.pl to find the people, and all already in the CC,  will add proper maillist into each patch.

> Don't spam the rest!
Not so clearly, should I not CC other people not in the list below?

[wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0018-platform-x86-eeepc-laptop-Use-pr_warn-instead-of-pr_.patch
Corentin Chary <corentin.chary@gmail.com> (maintainer:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
acpi4asus-user@lists.sourceforge.net (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
platform-driver-x86@vger.kernel.org (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
linux-kernel@vger.kernel.org (open list)
[wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0019-platform-x86-asus-laptop-Use-pr_warn-instead-of-pr_w.patch
Corentin Chary <corentin.chary@gmail.com> (maintainer:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
acpi4asus-user@lists.sourceforge.net (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
platform-driver-x86@vger.kernel.org (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
linux-kernel@vger.kernel.org (open list)
[wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0020-platform-x86-intel_oaktrail-Use-pr_warn-instead-of-p.patch
Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS,commit_signer:2/2=100%,authored:2/2=100%,added_lines:9/9=100%,removed_lines:23/23=100%)
platform-driver-x86@vger.kernel.org (open list:X86 PLATFORM DRIVERS)
linux-kernel@vger.kernel.org (open list)

>> Cc: Corentin Chary <corentin.chary@gmail.com>
>> Cc: Darren Hart <dvhart@infradead.org>
>> Cc: Andy Shevchenko <andy@infradead.org>
>> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>> ---
>>  drivers/platform/x86/intel_oaktrail.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
>> index 3c0438ba385e..1a09a75bd16d 100644
>> --- a/drivers/platform/x86/intel_oaktrail.c
>> +++ b/drivers/platform/x86/intel_oaktrail.c
>> @@ -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
>>
>


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 07/32] x86: Use pr_warn instead of pr_warning
  2019-09-20 15:28       ` Joe Perches
@ 2019-09-26  1:30         ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-26  1:30 UTC (permalink / raw)
  To: Joe Perches, Robert Richter
  Cc: Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Borislav Petkov, H. Peter Anvin, Darren Hart, Andy Shevchenko


On 2019/9/20 23:28, Joe Perches wrote:
> On Fri, 2019-09-20 at 19:57 +0800, Kefeng Wang wrote:
>> On 2019/9/20 17:28, Robert Richter wrote:
>>> On 20.09.19 14:25:19, Kefeng Wang wrote:
>>>> 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.
> []
>>>> diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c
> []
>>>> @@ -665,7 +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"
>>>> +	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU\n"
>>>>  	       "falling back to iommu=soft.\n");
>>> This indentation should be fixed too, while at it.
>> Will update later, thanks.
> trivia:
>
> likely better as a single line output:
>
> 	pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU - falling back to iommu=soft\n");

ok, will resend all patches after rc1 with this change and other comment fixes, thanks.

>
>
>
> .
>


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 24/32] dma-debug: Use pr_warn instead of pr_warning
  2019-09-25 17:13   ` Christoph Hellwig
@ 2019-09-26  1:44     ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-26  1:44 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Joe Perches, Andrew Morton, Ingo Molnar, David S. Miller,
	Arnaldo Carvalho de Melo, Andy Whitcroft, Peter Zijlstra,
	Alexei Starovoitov, Daniel Borkmann, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Arnd Bergmann, linux-kernel,
	Marek Szyprowski, Robin Murphy


On 2019/9/26 1:13, Christoph Hellwig wrote:
> On Fri, Sep 20, 2019 at 02:25:36PM +0800, Kefeng Wang wrote:
>> 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.
> Please just send a script after -rc1 instead of sending all these
> little patches.

For all changes,  just git grep -w pr_warning | cut -d ':' -f1 | uniq | sort | xargs sed -i 's/pr_warning/pr_warn/g',

but I do need check them manually and make some minor improvements, like coalesce format, realign arguments,

and remove unnecessary line continuations. thus, send these littles patches.

Thanks.

> .
>


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 30/32] tools lib bpf: Renaming pr_warning to pr_warn
  2019-09-23 13:35         ` Daniel Borkmann
@ 2019-09-26  2:01           ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-26  2:01 UTC (permalink / raw)
  To: Daniel Borkmann, Petr Mladek
  Cc: Linus Torvalds, Andrii Nakryiko, Arnd Bergmann, Andy Whitcroft,
	David S. Miller, Martin KaFai Lau, Song Liu, Yonghong Song,
	Sergey Senozhatsky, Peter Zijlstra, Alexei Starovoitov,
	Andrew Morton, Greg Kroah-Hartman, Joe Perches,
	Arnaldo Carvalho de Melo, Ingo Molnar, bpf, open list


On 2019/9/23 21:35, Daniel Borkmann wrote:
> On Mon, Sep 23, 2019 at 01:03:06PM +0200, Petr Mladek wrote:
>> On Mon 2019-09-23 10:20:39, Daniel Borkmann wrote:
>>> On Sun, Sep 22, 2019 at 02:07:21PM -0700, Andrii Nakryiko wrote:
>>>> On Fri, Sep 20, 2019 at 10:06 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>>>> 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.
>>>>>
>>>>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>>>>> ---
>>>>>  tools/lib/bpf/btf.c             |  56 +--
>>>>>  tools/lib/bpf/btf_dump.c        |  20 +-
>>>>>  tools/lib/bpf/libbpf.c          | 652 ++++++++++++++++----------------
>>>>>  tools/lib/bpf/libbpf_internal.h |   2 +-
>>>>>  tools/lib/bpf/xsk.c             |   4 +-
>>>>>  5 files changed, 363 insertions(+), 371 deletions(-)
>>>> Thanks! This will allow to get rid of tons warnings from checkpatch.pl.
>>>>
>>>> Alexei, Daniel, can we take this through bpf-next tree once it's open?
>>> I'd be fine with that, in fact, it probably should be in order to avoid
>>> merge conflicts since pr_warn{ing}() is used all over the place in libbpf.
>> The entire patchset modifies many files all over the tree.
>> This is from https://lkml.kernel.org/r/20190920062544.180997-1-wangkefeng.wang@huawei.com
>>
>>     120 files changed, 882 insertions(+), 927 deletions(-)
>>
>> Would it make sense to push everything at the end of the merge window
>> or for 5.4-rc2 after master settles down?
> If all over the tree it would probably make more sense for e.g. Andrew Morton to
> pick it up if there are no other objections, and try to merge it during mentioned
> time frame.

Hi Andrew,could you pick them up if no objections, and I could resend all with comment fixed

with better time frame(rc1 or rc2 ), is it OK?

Thanks.

>
> Thanks,
> Daniel
>
> .
>


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-26  1:28           ` Kefeng Wang
@ 2019-09-26  5:48             ` Andy Shevchenko
  2019-09-26  6:09               ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Andy Shevchenko @ 2019-09-26  5:48 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Linux Kernel Mailing List, Corentin Chary, Darren Hart, Andy Shevchenko

On Thu, Sep 26, 2019 at 4:29 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> On 2019/9/25 23:04, Andy Shevchenko wrote:
> > On Fri, Sep 20, 2019 at 1:55 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:

> > You have to send to proper mailing lists and people.
>
> Used get_maintainer.pl to find the people, and all already in the CC,  will add proper maillist into each patch.
>
> > Don't spam the rest!
> Not so clearly, should I not CC other people not in the list below?
>
> [wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0018-platform-x86-eeepc-laptop-Use-pr_warn-instead-of-pr_.patch
> Corentin Chary <corentin.chary@gmail.com> (maintainer:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
> Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
> Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)

You put a lot more people in Cc, than above list contains.

> acpi4asus-user@lists.sourceforge.net (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)

> platform-driver-x86@vger.kernel.org (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)

This had been absent in your submission.

> linux-kernel@vger.kernel.org (open list)

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-26  5:48             ` Andy Shevchenko
@ 2019-09-26  6:09               ` Kefeng Wang
  2019-09-26  7:32                 ` Andy Shevchenko
  0 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-09-26  6:09 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Darren Hart, Andy Shevchenko


On 2019/9/26 13:48, Andy Shevchenko wrote:
> On Thu, Sep 26, 2019 at 4:29 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> On 2019/9/25 23:04, Andy Shevchenko wrote:
>>> On Fri, Sep 20, 2019 at 1:55 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>> You have to send to proper mailing lists and people.
>> Used get_maintainer.pl to find the people, and all already in the CC,  will add proper maillist into each patch.
>>
>>> Don't spam the rest!
>> Not so clearly, should I not CC other people not in the list below?
>>
>> [wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0018-platform-x86-eeepc-laptop-Use-pr_warn-instead-of-pr_.patch
>> Corentin Chary <corentin.chary@gmail.com> (maintainer:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
>> Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
>> Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
> You put a lot more people in Cc, than above list contains.

This is a treewide change, and finally kill pr_warning in the whole linux code, so I add more people into Cc list.

Here is a brief discussion about how this be picked up,  is this ok for you?

https://lore.kernel.org/lkml/82fe3d04-2985-7844-31bb-269655c83873@huawei.com/


>
>> acpi4asus-user@lists.sourceforge.net (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
>> platform-driver-x86@vger.kernel.org (open list:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
> This had been absent in your submission.

Ok , will be more careful about this next time.

Thanks.

>
>> linux-kernel@vger.kernel.org (open list)


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-26  6:09               ` Kefeng Wang
@ 2019-09-26  7:32                 ` Andy Shevchenko
  2019-09-26  7:48                   ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Andy Shevchenko @ 2019-09-26  7:32 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Linux Kernel Mailing List, Corentin Chary, Darren Hart, Andy Shevchenko

On Thu, Sep 26, 2019 at 9:09 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> On 2019/9/26 13:48, Andy Shevchenko wrote:
> > On Thu, Sep 26, 2019 at 4:29 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> >> On 2019/9/25 23:04, Andy Shevchenko wrote:
> >>> On Fri, Sep 20, 2019 at 1:55 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> >>> You have to send to proper mailing lists and people.
> >> Used get_maintainer.pl to find the people, and all already in the CC,  will add proper maillist into each patch.
> >>
> >>> Don't spam the rest!
> >> Not so clearly, should I not CC other people not in the list below?
> >>
> >> [wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0018-platform-x86-eeepc-laptop-Use-pr_warn-instead-of-pr_.patch
> >> Corentin Chary <corentin.chary@gmail.com> (maintainer:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
> >> Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
> >> Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
> > You put a lot more people in Cc, than above list contains.
>
> This is a treewide change, and finally kill pr_warning in the whole linux code, so I add more people into Cc list.

No _this_ is change for only one subsystem / driver.
Since the set is of independent patches, you may add all people to
cover letter which I happened not to see and to the patches that are
core of the series (like one with pr_warning() kill).

For now I considered them as completely independent to push thru my tree.
In any case you have to carefully choose the Cc list per each patch in
a treewide changes.

> Here is a brief discussion about how this be picked up,  is this ok for you?
>
> https://lore.kernel.org/lkml/82fe3d04-2985-7844-31bb-269655c83873@huawei.com/

I haven't got this. Care to do what I said above about cover letter
and tell all stakeholders what you are expecting from them to do.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH v2 3/3] platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  2019-09-26  7:32                 ` Andy Shevchenko
@ 2019-09-26  7:48                   ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-09-26  7:48 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Darren Hart, Andy Shevchenko



On 2019/9/26 15:32, Andy Shevchenko wrote:
> On Thu, Sep 26, 2019 at 9:09 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> On 2019/9/26 13:48, Andy Shevchenko wrote:
>>> On Thu, Sep 26, 2019 at 4:29 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>>> On 2019/9/25 23:04, Andy Shevchenko wrote:
>>>>> On Fri, Sep 20, 2019 at 1:55 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>>>> You have to send to proper mailing lists and people.
>>>> Used get_maintainer.pl to find the people, and all already in the CC,  will add proper maillist into each patch.
>>>>
>>>>> Don't spam the rest!
>>>> Not so clearly, should I not CC other people not in the list below?
>>>>
>>>> [wkf@localhost linux]$ ./scripts/get_maintainer.pl pr_warning/v3/0018-platform-x86-eeepc-laptop-Use-pr_warn-instead-of-pr_.patch
>>>> Corentin Chary <corentin.chary@gmail.com> (maintainer:ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS)
>>>> Darren Hart <dvhart@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
>>>> Andy Shevchenko <andy@infradead.org> (odd fixer:X86 PLATFORM DRIVERS)
>>> You put a lot more people in Cc, than above list contains.
>>
>> This is a treewide change, and finally kill pr_warning in the whole linux code, so I add more people into Cc list.
> 
> No _this_ is change for only one subsystem / driver.
> Since the set is of independent patches, you may add all people to
> cover letter which I happened not to see and to the patches that are
> core of the series (like one with pr_warning() kill).
> 
> For now I considered them as completely independent to push thru my tree.
> In any case you have to carefully choose the Cc list per each patch in
> a treewide changes.
> 
>> Here is a brief discussion about how this be picked up,  is this ok for you?
>>
>> https://lore.kernel.org/lkml/82fe3d04-2985-7844-31bb-269655c83873@huawei.com/
> 
> I haven't got this. Care to do what I said above about cover letter
> and tell all stakeholders what you are expecting from them to do.

Got it, will put all stakeholders into cover letter next time.
Thanks for your patient guidance.
> 


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
                   ` (32 preceding siblings ...)
  2019-09-20  9:29 ` [PATCH 00/32] Kill pr_warning in the whole linux code Sergey Senozhatsky
@ 2019-10-02  8:55 ` Petr Mladek
  2019-10-08  6:39   ` Kefeng Wang
  33 siblings, 1 reply; 68+ messages in thread
From: Petr Mladek @ 2019-10-02  8:55 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Kefeng Wang, Arnd Bergmann, Andy Whitcroft, David S. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, GregKroah-Hartman, Joe Perches,
	Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel

Linus,

On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
> There are pr_warning and pr_warng to show WARNING level message,
> most of the code using pr_warn, number based on next-20190919,
>
> pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)

The ratio is 10:1 in favor of pr_warn(). It would make sense
to remove the pr_warning().

Would you accept pull request with these 32 simple patches
for rc2, please?

Alternative is to run a simple sed. But it is not trivial
to fix indentation of the related lines.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-10-02  8:55 ` Petr Mladek
@ 2019-10-08  6:39   ` Kefeng Wang
  2019-10-17 13:05     ` Petr Mladek
  0 siblings, 1 reply; 68+ messages in thread
From: Kefeng Wang @ 2019-10-08  6:39 UTC (permalink / raw)
  To: Petr Mladek, Linus Torvalds
  Cc: Arnd Bergmann, Andy Whitcroft, David S. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, GregKroah-Hartman, Joe Perches,
	Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel

Hi all,

On 2019/10/2 16:55, Petr Mladek wrote:
> Linus,
> 
> On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
>> There are pr_warning and pr_warng to show WARNING level message,
>> most of the code using pr_warn, number based on next-20190919,
>>
>> pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)
> 
> The ratio is 10:1 in favor of pr_warn(). It would make sense
> to remove the pr_warning().
> 
> Would you accept pull request with these 32 simple patches
> for rc2, please?
> 
> Alternative is to run a simple sed. But it is not trivial
> to fix indentation of the related lines.

Kindly ping, should I respin patches with comments fixed?
Is the patchset acceptable, hope to be clear that what to do next :)

Thanks

> 
> Best Regards,
> Petr
> 
> .
> 


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-10-08  6:39   ` Kefeng Wang
@ 2019-10-17 13:05     ` Petr Mladek
  2019-10-17 13:29       ` Kefeng Wang
  0 siblings, 1 reply; 68+ messages in thread
From: Petr Mladek @ 2019-10-17 13:05 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Linus Torvalds, Arnd Bergmann, Andy Whitcroft, DavidS. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, GregKroah-Hartman, Joe Perches,
	ArnaldoCarvalho de Melo, Ingo Molnar, linux-kernel

On Tue 2019-10-08 14:39:32, Kefeng Wang wrote:
> Hi all,
> 
> On 2019/10/2 16:55, Petr Mladek wrote:
> > Linus,
> > 
> > On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
> >> There are pr_warning and pr_warng to show WARNING level message,
> >> most of the code using pr_warn, number based on next-20190919,
> >>
> >> pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)
> > 
> > The ratio is 10:1 in favor of pr_warn(). It would make sense
> > to remove the pr_warning().
> > 
> > Would you accept pull request with these 32 simple patches
> > for rc2, please?
> > 
> > Alternative is to run a simple sed. But it is not trivial
> > to fix indentation of the related lines.
> 
> Kindly ping, should I respin patches with comments fixed?
> Is the patchset acceptable, hope to be clear that what to do next :)

I am going to check how many conflicts appeared in linux-next.

If there are only few then I'll take it via printk.git. This way
we get proper indentation and other changes.

If there are too many conflicts then I'll ask Linus to do a mass
change using a script.

I am sorry for late reply. I have never pushed such a mass change.
I hoped that anyone more experienced will provide some opinion ;-)

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-10-17 13:05     ` Petr Mladek
@ 2019-10-17 13:29       ` Kefeng Wang
  2019-10-17 13:52         ` Petr Mladek
  2019-10-17 16:38         ` Joe Perches
  0 siblings, 2 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-10-17 13:29 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Linus Torvalds, Arnd Bergmann, Andy Whitcroft, DavidS. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, GregKroah-Hartman, Joe Perches,
	ArnaldoCarvalho de Melo, Ingo Molnar, linux-kernel



On 2019/10/17 21:05, Petr Mladek wrote:
> On Tue 2019-10-08 14:39:32, Kefeng Wang wrote:
>> Hi all,
>>
>> On 2019/10/2 16:55, Petr Mladek wrote:
>>> Linus,
>>>
>>> On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
>>>> There are pr_warning and pr_warng to show WARNING level message,
>>>> most of the code using pr_warn, number based on next-20190919,
>>>>
>>>> pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)
>>>
>>> The ratio is 10:1 in favor of pr_warn(). It would make sense
>>> to remove the pr_warning().
>>>
>>> Would you accept pull request with these 32 simple patches
>>> for rc2, please?
>>>
>>> Alternative is to run a simple sed. But it is not trivial
>>> to fix indentation of the related lines.
>>
>> Kindly ping, should I respin patches with comments fixed?
>> Is the patchset acceptable, hope to be clear that what to do next :)
> 
> I am going to check how many conflicts appeared in linux-next.
> 
> If there are only few then I'll take it via printk.git. This way
> we get proper indentation and other changes.

There are some conflicts(not too much), and I have already rebased
on next-20191017 with comment fixed, added Reviewed-by/Acked-by.
I could resend them ASAP if necessary.
> 
> If there are too many conflicts then I'll ask Linus to do a mass
> change using a script.

For tools parts(api/bpf/perf, patch [29-31]), it renames pr_warning
to pr_warn, and make manually changes in some place, simply 'sed'
maybe not enough.

Thanks
Kefeng

> 
> I am sorry for late reply. I have never pushed such a mass change.
> I hoped that anyone more experienced will provide some opinion ;-)
> 
> Best Regards,
> Petr
> 
> .
> 


^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-10-17 13:29       ` Kefeng Wang
@ 2019-10-17 13:52         ` Petr Mladek
  2019-10-17 16:38         ` Joe Perches
  1 sibling, 0 replies; 68+ messages in thread
From: Petr Mladek @ 2019-10-17 13:52 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Arnd Bergmann, Andy Whitcroft, DavidS. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, Linus Torvalds,
	GregKroah-Hartman, Joe Perches, ArnaldoCarvalho de Melo,
	Ingo Molnar, linux-kernel

On Thu 2019-10-17 21:29:55, Kefeng Wang wrote:
> 
> 
> On 2019/10/17 21:05, Petr Mladek wrote:
> > On Tue 2019-10-08 14:39:32, Kefeng Wang wrote:
> >> Hi all,
> >>
> >> On 2019/10/2 16:55, Petr Mladek wrote:
> >>> Linus,
> >>>
> >>> On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
> >>>> There are pr_warning and pr_warng to show WARNING level message,
> >>>> most of the code using pr_warn, number based on next-20190919,
> >>>>
> >>>> pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)
> >>>
> >>> The ratio is 10:1 in favor of pr_warn(). It would make sense
> >>> to remove the pr_warning().
> >>>
> >>> Would you accept pull request with these 32 simple patches
> >>> for rc2, please?
> >>>
> >>> Alternative is to run a simple sed. But it is not trivial
> >>> to fix indentation of the related lines.
> >>
> >> Kindly ping, should I respin patches with comments fixed?
> >> Is the patchset acceptable, hope to be clear that what to do next :)
> > 
> > I am going to check how many conflicts appeared in linux-next.
> > 
> > If there are only few then I'll take it via printk.git. This way
> > we get proper indentation and other changes.
> 
> There are some conflicts(not too much), and I have already rebased
> on next-20191017 with comment fixed, added Reviewed-by/Acked-by.
> I could resend them ASAP if necessary.

OK, resend them, please.

> > If there are too many conflicts then I'll ask Linus to do a mass
> > change using a script.
> 
> For tools parts(api/bpf/perf, patch [29-31]), it renames pr_warning
> to pr_warn, and make manually changes in some place, simply 'sed'
> maybe not enough.

Yup.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-10-17 13:29       ` Kefeng Wang
  2019-10-17 13:52         ` Petr Mladek
@ 2019-10-17 16:38         ` Joe Perches
  2019-10-18  1:11           ` Kefeng Wang
  1 sibling, 1 reply; 68+ messages in thread
From: Joe Perches @ 2019-10-17 16:38 UTC (permalink / raw)
  To: Kefeng Wang, Petr Mladek
  Cc: Linus Torvalds, Arnd Bergmann, Andy Whitcroft, DavidS. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, GregKroah-Hartman,
	ArnaldoCarvalho de Melo, Ingo Molnar, linux-kernel

On Thu, 2019-10-17 at 21:29 +0800, Kefeng Wang wrote:
> On 2019/10/17 21:05, Petr Mladek wrote:
> > On Tue 2019-10-08 14:39:32, Kefeng Wang wrote:
> > > On 2019/10/2 16:55, Petr Mladek wrote:
> > > > On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
> > > > > There are pr_warning and pr_warng to show WARNING level message,
> > > > > most of the code using pr_warn, number based on next-20190919,
> > > > > 
> > > > > pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)
> > > > 
> > > > The ratio is 10:1 in favor of pr_warn(). It would make sense
> > > > to remove the pr_warning().
> > > > 
> > > > Would you accept pull request with these 32 simple patches
> > > > for rc2, please?
> > > > 
> > > > Alternative is to run a simple sed. But it is not trivial
> > > > to fix indentation of the related lines.
> > > 
> > > Kindly ping, should I respin patches with comments fixed?
> > > Is the patchset acceptable, hope to be clear that what to do next :)
> > 
> > I am going to check how many conflicts appeared in linux-next.
> > 
> > If there are only few then I'll take it via printk.git. This way
> > we get proper indentation and other changes.
[]
> For tools parts(api/bpf/perf, patch [29-31]), it renames pr_warning
> to pr_warn, and make manually changes in some place, simply 'sed'
> maybe not enough.

Perhaps tools/ should not be changed.

Last time I did this, I did not convert tools/ as there are
possible external dependencies and code like pr_warning_wrapper
exists and that adds some complexity to the change.

https://lore.kernel.org/patchwork/cover/761816/



^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 00/32] Kill pr_warning in the whole linux code
  2019-10-17 16:38         ` Joe Perches
@ 2019-10-18  1:11           ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2019-10-18  1:11 UTC (permalink / raw)
  To: Joe Perches, Petr Mladek
  Cc: Linus Torvalds, Arnd Bergmann, Andy Whitcroft, DavidS. Miller,
	Sergey Senozhatsky, Peter Zijlstra, Daniel Borkmann,
	AlexeiStarovoitov, Andrew Morton, GregKroah-Hartman,
	ArnaldoCarvalho de Melo, Ingo Molnar, linux-kernel



On 2019/10/18 0:38, Joe Perches wrote:
> On Thu, 2019-10-17 at 21:29 +0800, Kefeng Wang wrote:
>> On 2019/10/17 21:05, Petr Mladek wrote:
>>> On Tue 2019-10-08 14:39:32, Kefeng Wang wrote:
>>>> On 2019/10/2 16:55, Petr Mladek wrote:
>>>>> On Fri 2019-09-20 14:25:12, Kefeng Wang wrote:
>>>>>> There are pr_warning and pr_warng to show WARNING level message,
>>>>>> most of the code using pr_warn, number based on next-20190919,
>>>>>>
>>>>>> pr_warn: 5189   pr_warning: 546 (tools: 398, others: 148)
>>>>>
>>>>> The ratio is 10:1 in favor of pr_warn(). It would make sense
>>>>> to remove the pr_warning().
>>>>>
>>>>> Would you accept pull request with these 32 simple patches
>>>>> for rc2, please?
>>>>>
>>>>> Alternative is to run a simple sed. But it is not trivial
>>>>> to fix indentation of the related lines.
>>>>
>>>> Kindly ping, should I respin patches with comments fixed?
>>>> Is the patchset acceptable, hope to be clear that what to do next :)
>>>
>>> I am going to check how many conflicts appeared in linux-next.
>>>
>>> If there are only few then I'll take it via printk.git. This way
>>> we get proper indentation and other changes.
> []
>> For tools parts(api/bpf/perf, patch [29-31]), it renames pr_warning
>> to pr_warn, and make manually changes in some place, simply 'sed'
>> maybe not enough.
> 
> Perhaps tools/ should not be changed.
> 
> Last time I did this, I did not convert tools/ as there are
> possible external dependencies and code like pr_warning_wrapper
> exists and that adds some complexity to the change.

The pr_warning dependencies and wrappers in tools may not seem
to be much in following head files, and build test all passed.

tools/lib/api/debug-internal.h
tools/lib/bpf/libbpf_internal.h
tools/perf/lib/internal.h
tools/perf/util/debug.h

Let's remove all pr_warning if there is no objection.>
> https://lore.kernel.org/patchwork/cover/761816/
> 
> 
> 
> .
> 


^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2019-10-18  1:11 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20  6:25 [PATCH 00/32] Kill pr_warning in the whole linux code Kefeng Wang
2019-09-20  6:25 ` [PATCH 01/32] alpha: Use pr_warn instead of pr_warning Kefeng Wang
2019-09-20  6:25 ` [PATCH 02/32] arm64: " Kefeng Wang
2019-09-20 15:57   ` Will Deacon
2019-09-20  6:25 ` [PATCH 03/32] ia64: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 04/32] riscv: " Kefeng Wang
2019-09-25 21:05   ` Palmer Dabbelt
2019-09-20  6:25 ` [PATCH 05/32] sh: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 06/32] sparc: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 07/32] x86: " Kefeng Wang
2019-09-20  9:28   ` Robert Richter
2019-09-20 11:57     ` Kefeng Wang
2019-09-20 15:28       ` Joe Perches
2019-09-26  1:30         ` Kefeng Wang
2019-09-20  6:25 ` [PATCH 08/32] acpi: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 09/32] drbd: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 10/32] gdrom: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 11/32] clocksource: samsung_pwm_timer: " Kefeng Wang
2019-09-20  8:25   ` Daniel Lezcano
2019-09-20  6:25 ` [PATCH 12/32] crypto: n2: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 13/32] ide: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 14/32] idsn: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 15/32] macintosh: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 16/32] of: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 17/32] oprofile: " Kefeng Wang
2019-09-20  9:18   ` Robert Richter
2019-09-20  6:25 ` [PATCH 18/32] platform/x86: " Kefeng Wang
2019-09-20  6:26   ` Andy Shevchenko
2019-09-20  6:31     ` Kefeng Wang
2019-09-20 11:12     ` [PATCH v2 1/3] platform/x86: eeepc-laptop: " Kefeng Wang
2019-09-20 11:12       ` [PATCH v2 2/3] platform/x86: asus-laptop: " Kefeng Wang
2019-09-20 11:12       ` [PATCH v2 3/3] platform/x86: intel_oaktrail: " Kefeng Wang
2019-09-25 15:04         ` Andy Shevchenko
2019-09-26  1:28           ` Kefeng Wang
2019-09-26  5:48             ` Andy Shevchenko
2019-09-26  6:09               ` Kefeng Wang
2019-09-26  7:32                 ` Andy Shevchenko
2019-09-26  7:48                   ` Kefeng Wang
2019-09-20  6:25 ` [PATCH 19/32] scsi: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 20/32] sh/intc: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 21/32] staging: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 22/32] fs: afs: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 23/32] vgacon: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 24/32] dma-debug: " Kefeng Wang
2019-09-25 17:13   ` Christoph Hellwig
2019-09-26  1:44     ` Kefeng Wang
2019-09-20  6:25 ` [PATCH 25/32] trace: " Kefeng Wang
2019-09-20 13:26   ` Steven Rostedt
2019-09-20  6:25 ` [PATCH 26/32] lib: cpu_rmap: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 27/32] ASoC: samsung: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 28/32] printk: Drop pr_warning Kefeng Wang
2019-09-20  6:25 ` [PATCH 29/32] tools lib api: Renaming pr_warning to pr_warn Kefeng Wang
2019-09-20  6:25 ` [PATCH 30/32] tools lib bpf: " Kefeng Wang
2019-09-22 21:07   ` Andrii Nakryiko
2019-09-23  8:20     ` Daniel Borkmann
2019-09-23 11:03       ` Petr Mladek
2019-09-23 13:35         ` Daniel Borkmann
2019-09-26  2:01           ` Kefeng Wang
2019-09-20  6:25 ` [PATCH 31/32] tools perf: " Kefeng Wang
2019-09-20  6:25 ` [PATCH 32/32] checkpatch: Drop pr_warning check Kefeng Wang
2019-09-20  9:29 ` [PATCH 00/32] Kill pr_warning in the whole linux code Sergey Senozhatsky
2019-10-02  8:55 ` Petr Mladek
2019-10-08  6:39   ` Kefeng Wang
2019-10-17 13:05     ` Petr Mladek
2019-10-17 13:29       ` Kefeng Wang
2019-10-17 13:52         ` Petr Mladek
2019-10-17 16:38         ` Joe Perches
2019-10-18  1:11           ` Kefeng Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).