[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdOMcCJ48N7UJT8J@smile.fi.intel.com>
Date: Mon, 19 Feb 2024 19:14:24 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Tony Lindgren <tony@...mide.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Justin Chen <justin.chen@...adcom.com>,
Jiaqing Zhao <jiaqing.zhao@...ux.intel.com>,
linux-serial@...r.kernel.org
Subject: Re: [PATCH printk v2 08/26] printk: nbcon: Implement processing in
port->lock wrapper
On Mon, Feb 19, 2024 at 05:58:41PM +0106, John Ogness wrote:
> On 2024-02-19, Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> >>> The headers in this file is a mess. But here you can at least keep the
> >>> piece ordered, can you?
> >>
> >> Just to clarify, you would like to see this ordering and inclusion?
> >
> > Roughly, yes. Ideally it is quite likely that kernel.h is being used as
> > a 'proxy' header. Nowadays, it's rare the code needs kernel.h.
>
> So I took the time to painfully discover every header that is required
> for nbcon.c without any proxy usage. It came down to this:
>
> #include <linux/atomic.h>
> #include <linux/bug.h>
> #include <linux/compiler.h>
This is guaranteed to be included by types.h, can be dropped.
> #include <linux/console.h>
> #include <linux/delay.h>
> #include <linux/errno.h>
> #include <linux/export.h>
> #include <linux/init.h>
> #include <linux/irqflags.h>
> #include <linux/minmax.h>
> #include <linux/percpu-defs.h>
This...
> #include <linux/preempt.h>
> #include <linux/serial_core.h>
> #include <linux/slab.h>
> #include <linux/smp.h>
..and this I believe can be represented by percpu.h as most likely that is the
"main" library you are using.
> #include <linux/stddef.h>
> #include <linux/string.h>
> #include <linux/types.h>
> #include "internal.h"
>
> For the next version of this series I will only add the includes you
> suggested, but will follow-up with a patch that fixes all proxy headers
> for nbcon.c. As a separate patch it will help with bisecting in case the
> ordering causes an explosion on some config/architecture.
Sure, thanks!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists