lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/3] printk: introduce new macros pr_<level>_cont()
Date
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

\
 
 \ /
  Last update: 2022-11-25 20:11    [W:0.179 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site