[PATCH 0/5] log: convert pr_*() to logging
Heinrich Schuchardt
xypron.glpk at gmx.de
Mon Jan 4 08:02:51 CET 2021
In drivers we use a family of printing functions including pr_err() and
pr_cont(). CONFIG_LOGLEVEL is used to control which of these lead to output
via printf().
Our logging functions allow finer grained control of output. So replace
printf() by the matching logging functions. The usage of CONFIG_LOGLEVEL
remains unchanged.
The first patch changes the k3-j721e RAM driver to avoid a duplicate use of
the macro name BIT_MASK().
The second patch ensures that debug_cond() can be used like a function.
The third patch provides macros for logging at levels EMERGENCY, ALERT,
CRITICAL and for message continuation.
The fourth patch uses the logging macros to implement the pr_*() macros.
The fifth patch provices a unit test.
Heinrich Schuchardt (5):
ram: k3-j721e: rename BIT_MASK()
log: make debug_cond() function like
log: provide missing macros
log: convert pr_*() to logging
test: unit test for pr_err(), pr_cont()
drivers/ram/k3-j721e/lpddr4.c | 14 ++---
drivers/ram/k3-j721e/lpddr4_private.h | 20 ++++---
include/linux/bitops.h | 4 +-
include/linux/printk.h | 82 +++++++++++++++------------
include/log.h | 25 +++++---
test/log/Makefile | 1 +
test/log/pr_cont_test.c | 45 +++++++++++++++
7 files changed, 129 insertions(+), 62 deletions(-)
create mode 100644 test/log/pr_cont_test.c
--
2.29.2
More information about the U-Boot
mailing list