]> 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)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:39 +0000 (18:17 -0400)
commit3a2bd2b150f45844d99267696256716e4f23bf53
tree6b7f7ca7a22eb98de38018a8d55d2bec87050e5a
parent7c09db1068170e42fa85e25ff1367843e7326829
printk: Use prb_first_seq() as base for 32bit seq macros

[ Upstream commit 90ad525c2d9a8a6591ab822234a94b82871ef8e0 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/printk/printk_ringbuffer.c
kernel/printk/printk_ringbuffer.h