From: John Ogness <john.ogness@linutronix.de>
To: Petr Mladek <pmladek@suse.com>
Cc: Chris Down <chris@chrisdown.name>,
linux-kernel@vger.kernel.org, Jessica Yu <jeyu@kernel.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Kees Cook <keescook@chromium.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
kernel-team@fb.com
Subject: Re: [PATCH v6 2/4] printk: Straighten out log_flags into printk_info_flags
Date: Wed, 26 May 2021 10:39:18 +0200 [thread overview]
Message-ID: <87v975c2ix.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <YK35OTteXMoET3SZ@alley>
On 2021-05-26, Petr Mladek <pmladek@suse.com> wrote:
>> >> diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h
>> >> index 73cc80e01cef..71918d47ca95 100644
>> >> --- a/kernel/printk/printk_ringbuffer.h
>> >> +++ b/kernel/printk/printk_ringbuffer.h
>> >> @@ -50,6 +50,12 @@ struct prb_data_blk_lpos {
>> >> unsigned long next;
>> >> };
>> >>
>> >> +/* Flags for a single printk record. */
>> >> +enum printk_info_flags {
>> >> + LOG_NEWLINE = 2, /* text ended with a newline */
>> >> + LOG_CONT = 8, /* text is a fragment of a continuation line */
>> >> +};
>> >
>> > Nit: Could you please move this after "enum desc_state" declaration?
>>
>> Is there a reason that this enum is moved into printk_ringbuffer.h? The
>> ringbuffer does not use this enum.
>
> We want to use it in two source files: printk.c and index.c
> Alternative solution would be to move it to kernel/printk/internal.h.
>
> Well, will internal.h still be needed after we remove printk_safe?
We wouldn't be able to remove internal.h until deferred printing is
removed. And that cannot happen until after printing kthreads exist. So
it will still hang around for a while.
But even so, I do not like the idea of turning printk_ringbuffer.h into
the new internal.h. The ringbuffer is quite complex and IMHO we should
try to keep the printk_ringbuffer.* files as isolated as possible.
I would prefer to put this enum declaration in internal.h. Even if
eventually it is the only thing left in internal.h.
John Ogness
next prev parent reply other threads:[~2021-05-26 8:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 12:00 [PATCH v6 0/4] printk: Userspace format indexing support Chris Down
2021-05-18 12:00 ` [PATCH v6 1/4] string_helpers: Escape double quotes in escape_special Chris Down
2021-05-18 13:10 ` Andy Shevchenko
2021-05-18 14:10 ` Chris Down
2021-05-25 10:17 ` Petr Mladek
2021-05-18 12:00 ` [PATCH v6 2/4] printk: Straighten out log_flags into printk_info_flags Chris Down
2021-05-25 10:33 ` Petr Mladek
2021-05-25 11:35 ` John Ogness
2021-05-26 7:31 ` Petr Mladek
2021-05-26 8:39 ` John Ogness [this message]
2021-05-26 9:25 ` Petr Mladek
2021-06-01 15:16 ` Chris Down
2021-05-18 12:00 ` [PATCH v6 3/4] printk: Userspace format indexing support Chris Down
2021-05-18 13:30 ` Andy Shevchenko
2021-05-18 14:07 ` Chris Down
2021-05-18 16:00 ` Andy Shevchenko
2021-05-18 16:28 ` Chris Down
2021-05-18 16:59 ` Chris Down
2021-05-19 6:59 ` Rasmus Villemoes
2021-05-20 9:25 ` Andy Shevchenko
2021-05-25 15:19 ` Petr Mladek
2021-05-25 15:06 ` Petr Mladek
2021-06-01 15:15 ` Chris Down
2021-06-04 10:19 ` Petr Mladek
2021-06-04 11:50 ` Chris Down
2021-05-18 12:00 ` [PATCH v6 4/4] printk: index: Add indexing support to dev_printk Chris Down
2021-05-26 8:57 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v975c2ix.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chris@chrisdown.name \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=jeyu@kernel.org \
--cc=keescook@chromium.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox