Skip to content

Commit 436b2a8

Browse files
committed
Merge tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk
Pull printk updates from Petr Mladek: - Allow to print symbolic error names via new %pe modifier. - Use pr_warn() instead of the remaining pr_warning() calls. Fix formatting of the related lines. - Add VSPRINTF entry to MAINTAINERS. * tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits) checkpatch: don't warn about new vsprintf pointer extension '%pe' MAINTAINERS: Add VSPRINTF tools lib api: Renaming pr_warning to pr_warn ASoC: samsung: Use pr_warn instead of pr_warning lib: cpu_rmap: Use pr_warn instead of pr_warning trace: Use pr_warn instead of pr_warning dma-debug: Use pr_warn instead of pr_warning vgacon: Use pr_warn instead of pr_warning fs: afs: Use pr_warn instead of pr_warning sh/intc: Use pr_warn instead of pr_warning scsi: Use pr_warn instead of pr_warning platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning platform/x86: asus-laptop: Use pr_warn instead of pr_warning platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning oprofile: Use pr_warn instead of pr_warning of: Use pr_warn instead of pr_warning macintosh: Use pr_warn instead of pr_warning idsn: Use pr_warn instead of pr_warning ide: Use pr_warn instead of pr_warning crypto: n2: Use pr_warn instead of pr_warning ...
2 parents 1b96a41 + 1d28122 commit 436b2a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+571
-269
lines changed

Documentation/core-api/printk-formats.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ has the added benefit of providing a unique identifier. On 64-bit machines
7979
the first 32 bits are zeroed. The kernel will print ``(ptrval)`` until it
8080
gathers enough entropy. If you *really* want the address see %px below.
8181

82+
Error Pointers
83+
--------------
84+
85+
::
86+
87+
%pe -ENOSPC
88+
89+
For printing error pointers (i.e. a pointer for which IS_ERR() is true)
90+
as a symbolic error name. Error values for which no symbolic name is
91+
known are printed in decimal, while a non-ERR_PTR passed as the
92+
argument to %pe gets treated as ordinary %p.
93+
8294
Symbols/Function Pointers
8395
-------------------------
8496

MAINTAINERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17474,6 +17474,18 @@ S: Maintained
1747417474
F: drivers/net/vrf.c
1747517475
F: Documentation/networking/vrf.txt
1747617476

17477+
VSPRINTF
17478+
M: Petr Mladek <[email protected]>
17479+
M: Steven Rostedt <[email protected]>
17480+
M: Sergey Senozhatsky <[email protected]>
17481+
R: Andy Shevchenko <[email protected]>
17482+
R: Rasmus Villemoes <[email protected]>
17483+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git
17484+
S: Maintained
17485+
F: lib/vsprintf.c
17486+
F: lib/test_printf.c
17487+
F: Documentation/core-api/printk-formats.rst
17488+
1747717489
VT1211 HARDWARE MONITOR DRIVER
1747817490
M: Juerg Haefliger <[email protected]>
1747917491

arch/alpha/kernel/perf_event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
824824
if (unlikely(la_ptr >= alpha_pmu->num_pmcs)) {
825825
/* This should never occur! */
826826
irq_err_count++;
827-
pr_warning("PMI: silly index %ld\n", la_ptr);
827+
pr_warn("PMI: silly index %ld\n", la_ptr);
828828
wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask);
829829
return;
830830
}
@@ -847,7 +847,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
847847
if (unlikely(!event)) {
848848
/* This should never occur! */
849849
irq_err_count++;
850-
pr_warning("PMI: No event at index %d!\n", idx);
850+
pr_warn("PMI: No event at index %d!\n", idx);
851851
wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask);
852852
return;
853853
}

arch/arm64/kernel/hw_breakpoint.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int hw_breakpoint_slots(int type)
5151
case TYPE_DATA:
5252
return get_num_wrps();
5353
default:
54-
pr_warning("unknown slot type: %d\n", type);
54+
pr_warn("unknown slot type: %d\n", type);
5555
return 0;
5656
}
5757
}
@@ -112,7 +112,7 @@ static u64 read_wb_reg(int reg, int n)
112112
GEN_READ_WB_REG_CASES(AARCH64_DBG_REG_WVR, AARCH64_DBG_REG_NAME_WVR, val);
113113
GEN_READ_WB_REG_CASES(AARCH64_DBG_REG_WCR, AARCH64_DBG_REG_NAME_WCR, val);
114114
default:
115-
pr_warning("attempt to read from unknown breakpoint register %d\n", n);
115+
pr_warn("attempt to read from unknown breakpoint register %d\n", n);
116116
}
117117

118118
return val;
@@ -127,7 +127,7 @@ static void write_wb_reg(int reg, int n, u64 val)
127127
GEN_WRITE_WB_REG_CASES(AARCH64_DBG_REG_WVR, AARCH64_DBG_REG_NAME_WVR, val);
128128
GEN_WRITE_WB_REG_CASES(AARCH64_DBG_REG_WCR, AARCH64_DBG_REG_NAME_WCR, val);
129129
default:
130-
pr_warning("attempt to write to unknown breakpoint register %d\n", n);
130+
pr_warn("attempt to write to unknown breakpoint register %d\n", n);
131131
}
132132
isb();
133133
}
@@ -145,7 +145,7 @@ static enum dbg_active_el debug_exception_level(int privilege)
145145
case AARCH64_BREAKPOINT_EL1:
146146
return DBG_ACTIVE_EL1;
147147
default:
148-
pr_warning("invalid breakpoint privilege level %d\n", privilege);
148+
pr_warn("invalid breakpoint privilege level %d\n", privilege);
149149
return -EINVAL;
150150
}
151151
}

arch/arm64/kernel/smp.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ void __cpu_die(unsigned int cpu)
345345
*/
346346
err = op_cpu_kill(cpu);
347347
if (err)
348-
pr_warn("CPU%d may not have shut down cleanly: %d\n",
349-
cpu, err);
348+
pr_warn("CPU%d may not have shut down cleanly: %d\n", cpu, err);
350349
}
351350

352351
/*
@@ -976,8 +975,8 @@ void smp_send_stop(void)
976975
udelay(1);
977976

978977
if (num_online_cpus() > 1)
979-
pr_warning("SMP: failed to stop secondary CPUs %*pbl\n",
980-
cpumask_pr_args(cpu_online_mask));
978+
pr_warn("SMP: failed to stop secondary CPUs %*pbl\n",
979+
cpumask_pr_args(cpu_online_mask));
981980

982981
sdei_mask_local_cpu();
983982
}
@@ -1017,8 +1016,8 @@ void crash_smp_send_stop(void)
10171016
udelay(1);
10181017

10191018
if (atomic_read(&waiting_for_crash_ipi) > 0)
1020-
pr_warning("SMP: failed to stop secondary CPUs %*pbl\n",
1021-
cpumask_pr_args(&mask));
1019+
pr_warn("SMP: failed to stop secondary CPUs %*pbl\n",
1020+
cpumask_pr_args(&mask));
10221021

10231022
sdei_mask_local_cpu();
10241023
}

arch/ia64/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static void __init setup_crashkernel(unsigned long total, int *n)
289289
}
290290

291291
if (!check_crashkernel_memory(base, size)) {
292-
pr_warning("crashkernel: There would be kdump memory "
292+
pr_warn("crashkernel: There would be kdump memory "
293293
"at %ld GB but this is unusable because it "
294294
"must\nbe below 4 GB. Change the memory "
295295
"configuration of the machine.\n",

arch/riscv/kernel/module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
315315
/* Ignore unresolved weak symbol */
316316
if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
317317
continue;
318-
pr_warning("%s: Unknown symbol %s\n",
319-
me->name, strtab + sym->st_name);
318+
pr_warn("%s: Unknown symbol %s\n",
319+
me->name, strtab + sym->st_name);
320320
return -ENOENT;
321321
}
322322

arch/sh/boards/mach-sdk7786/nmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int __init nmi_mode_setup(char *str)
3737
nmi_mode = NMI_MODE_ANY;
3838
else {
3939
nmi_mode = NMI_MODE_UNKNOWN;
40-
pr_warning("Unknown NMI mode %s\n", str);
40+
pr_warn("Unknown NMI mode %s\n", str);
4141
}
4242

4343
printk("Set NMI mode to %d\n", nmi_mode);

arch/sh/drivers/pci/fixups-sdk7786.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static int __init sdk7786_pci_init(void)
5353

5454
/* Warn about forced rerouting if slot#3 is occupied */
5555
if ((data & PCIECR_PRST3) == 0) {
56-
pr_warning("Unreachable card detected in slot#3\n");
56+
pr_warn("Unreachable card detected in slot#3\n");
5757
return -EBUSY;
5858
}
5959
} else

arch/sh/kernel/io_trapped.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int register_trapped_io(struct trapped_io *tiop)
9999

100100
return 0;
101101
bad:
102-
pr_warning("unable to install trapped io filter\n");
102+
pr_warn("unable to install trapped io filter\n");
103103
return -1;
104104
}
105105
EXPORT_SYMBOL_GPL(register_trapped_io);

0 commit comments

Comments
 (0)