Re: [PATCH v2 0/2] printk_ringbuffer: don't needlessly wrap data blocks around

John Ogness
2025-09-11T16:12:34Z

On 2025-09-11, Petr Mladek <pmladek@suse.com> wrote:
> diff --git a/kernel/printk/printk_ringbuffer_kunit_test.c b/kernel/printk/printk_ringbuffer_kunit_test.c
> index 2282348e869a..241f7ef49ac6 100644
> --- a/kernel/printk/printk_ringbuffer_kunit_test.c
> +++ b/kernel/printk/printk_ringbuffer_kunit_test.c
> @@ -56,7 +56,7 @@ struct prbtest_rbdata {
> char text[] __counted_by(size);
> };
>
> -#define MAX_RBDATA_TEXT_SIZE 0x80
> +#define MAX_RBDATA_TEXT_SIZE (0x256 - sizeof(struct prbtest_rbdata))

I guess this should be:

#define MAX_RBDATA_TEXT_SIZE (256 - sizeof(struct prbtest_rbdata))

John