]> git.itanic.dy.fi Git - linux-stable/commit
printk: Use prb_first_seq() as base for 32bit seq macros
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 7 Feb 2024 13:40:52 +0000 (14:46 +0106)
committerPetr Mladek <pmladek@suse.com>
Wed, 7 Feb 2024 16:23:18 +0000 (17:23 +0100)
commit90ad525c2d9a8a6591ab822234a94b82871ef8e0
treef0e866b30640e74dd92ea31baaae8270ae52b5cb
parent418ec1961c07d84293cc3cd54d67b90bbeba7feb
printk: Use prb_first_seq() as base for 32bit seq macros

Note: This change only applies to 32bit architectures. On 64bit
      architectures the macros are NOPs.

Currently prb_next_seq() is used as the base for the 32bit seq
macros __u64seq_to_ulseq() and __ulseq_to_u64seq(). However, in
a follow-up commit, prb_next_seq() will need to make use of the
32bit seq macros.

Use prb_first_seq() as the base for the 32bit seq macros instead
because it is guaranteed to return 64bit sequence numbers without
relying on any 32bit seq macros.

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