printk: ringbuffer: Clarify special lpos values
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 7 Feb 2024 13:40:54 +0000 (14:46 +0106)
committerPetr Mladek <pmladek@suse.com>
Wed, 7 Feb 2024 16:23:18 +0000 (17:23 +0100)
commit5113cf5f4c53eb2901ddb8fa70b72e8b6f4084ac
tree8cb878d17b1bdddc6b16f25d9125854b6a687526
parent5f72e52ba959e50680b8d83599da1368cd7a6ee2
printk: ringbuffer: Clarify special lpos values

For empty line records, no data blocks are created. Instead,
these valid records are identified by special logical position
values (in fields of @prb_desc.text_blk_lpos).

Currently the macro NO_LPOS is used for empty line records.
This name is confusing because it does not imply _why_ there is
no data block.

Rename NO_LPOS to EMPTY_LINE_LPOS so that it is clear why there
is no data block.

Also add comments explaining the use of EMPTY_LINE_LPOS as well
as clarification to the values used to represent data-less
blocks.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-6-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk_ringbuffer.c
kernel/printk/printk_ringbuffer.h