Skip to content

Commit

Permalink
Merge tag 'printk-for-6.11-trivial' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/printk/linux

Pull printk updates from Petr Mladek:

 - trivial printk changes

The bigger "real" printk work is still being discussed.

* tag 'printk-for-6.11-trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  vsprintf: add missing MODULE_DESCRIPTION() macro
  printk: Rename console_replay_all() and update context
  • Loading branch information
Linus Torvalds committed Jul 25, 2024
2 parents b485625 + a930fde commit 8bf1000
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/tty/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static const struct sysrq_key_op sysrq_unrt_op = {

static void sysrq_handle_replay_logs(u8 key)
{
console_replay_all();
console_try_replay_all();
}
static struct sysrq_key_op sysrq_replay_logs_op = {
.handler = sysrq_handle_replay_logs,
Expand Down
4 changes: 2 additions & 2 deletions include/linux/printk.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void show_regs_print_info(const char *log_lvl);
extern asmlinkage void dump_stack_lvl(const char *log_lvl) __cold;
extern asmlinkage void dump_stack(void) __cold;
void printk_trigger_flush(void);
void console_replay_all(void);
void console_try_replay_all(void);
#else
static inline __printf(1, 0)
int vprintk(const char *s, va_list args)
Expand Down Expand Up @@ -276,7 +276,7 @@ static inline void dump_stack(void)
static inline void printk_trigger_flush(void)
{
}
static inline void console_replay_all(void)
static inline void console_try_replay_all(void)
{
}
#endif
Expand Down
6 changes: 3 additions & 3 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -4372,15 +4372,15 @@ void kmsg_dump_rewind(struct kmsg_dump_iter *iter)
EXPORT_SYMBOL_GPL(kmsg_dump_rewind);

/**
* console_replay_all - replay kernel log on consoles
* console_try_replay_all - try to replay kernel log on consoles
*
* Try to obtain lock on console subsystem and replay all
* available records in printk buffer on the consoles.
* Does nothing if lock is not obtained.
*
* Context: Any context.
* Context: Any, except for NMI.
*/
void console_replay_all(void)
void console_try_replay_all(void)
{
if (console_trylock()) {
__console_rewind_all();
Expand Down
1 change: 1 addition & 0 deletions lib/test_printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,4 +824,5 @@ static void __init selftest(void)

KSTM_MODULE_LOADERS(test_printf);
MODULE_AUTHOR("Rasmus Villemoes <linux@rasmusvillemoes.dk>");
MODULE_DESCRIPTION("Test cases for printf facility");
MODULE_LICENSE("GPL");
1 change: 1 addition & 0 deletions lib/test_scanf.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,4 +810,5 @@ static void __init selftest(void)

KSTM_MODULE_LOADERS(test_scanf);
MODULE_AUTHOR("Richard Fitzgerald <rf@opensource.cirrus.com>");
MODULE_DESCRIPTION("Test cases for sscanf facility");
MODULE_LICENSE("GPL v2");

0 comments on commit 8bf1000

Please sign in to comment.