Messages in this thread | | | From | Thomas Weißschuh <> | Subject | [PATCH v2 0/3] printk: introduce new macros pr_<level>_cont() | Date | Fri, 25 Nov 2022 20:09:45 +0100 |
| |
This series adds new printk wrapper macros pr_<level>_cont(). These create continuation messages with an explicit level.
Explicit levels are useful when a continuation message is split from its main message. Without the explicit level KERN_DEFAULT ("warn" by default) is used which can lead to stray partial log messages when filtering by level.
Also checkpatch is modified to recommend the new macros over plain pr_cont().
Lastly the new macros are used in kernel/power/process.c as this file uses continuation messages during system suspend-resume which creates a high likelyhood of interspersed messages.
Changelog:
This was original a single patch but was expanded into a series.
v1: https://lore.kernel.org/lkml/20221121050946.3540-1-linux@weissschuh.net/ v1 -> v2: * Introduce new pr_<level>_cont() macros in printk.h * Add checkpatch.pl validation
Thomas Weißschuh (3): printk: introduce new macros pr_<level>_cont() checkpatch: handle new pr_<level>_cont macros power: process: use explicit levels for printk continuations
include/linux/printk.h | 23 +++++++++++++++++++++++ kernel/power/process.c | 18 +++++++++--------- scripts/checkpatch.pl | 10 ++++++++-- 3 files changed, 40 insertions(+), 11 deletions(-)
base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536 -- 2.38.1
| |