linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] serial: 8250_pci1xxxx: Don't use "proxy" headers
@ 2024-02-13 19:38 Andy Shevchenko
  2024-02-14  9:15 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2024-02-13 19:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rengarajan S, linux-serial, linux-kernel
  Cc: Kumaravel Thiagarajan, Tharun Kumar P, Jiri Slaby,
	Andy Shevchenko

Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/8250/8250_pci1xxxx.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci1xxxx.c b/drivers/tty/serial/8250/8250_pci1xxxx.c
index 356972734b29..55eada1dba56 100644
--- a/drivers/tty/serial/8250/8250_pci1xxxx.c
+++ b/drivers/tty/serial/8250/8250_pci1xxxx.c
@@ -7,23 +7,31 @@
  *  Copyright (C) 2022 Microchip Technology Inc., All Rights Reserved.
  */
 
+#include <linux/array_size.h>
 #include <linux/bitfield.h>
-#include <linux/bitops.h>
-#include <linux/delay.h>
+#include <linux/bits.h>
+#include <linux/circ_buf.h>
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/gfp_types.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
-#include <linux/kernel.h>
+#include <linux/minmax.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/overflow.h>
 #include <linux/pci.h>
+#include <linux/pm.h>
 #include <linux/serial_core.h>
 #include <linux/serial_reg.h>
 #include <linux/serial_8250.h>
-#include <linux/slab.h>
+#include <linux/spinlock.h>
 #include <linux/string.h>
-#include <linux/units.h>
+#include <linux/time.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
-#include <linux/8250_pci.h>
+#include <linux/types.h>
+#include <linux/units.h>
 
 #include <asm/byteorder.h>
 
-- 
2.43.0.rc1.1.gbec44491f096


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_pci1xxxx: Don't use "proxy" headers
  2024-02-13 19:38 [PATCH v1 1/1] serial: 8250_pci1xxxx: Don't use "proxy" headers Andy Shevchenko
@ 2024-02-14  9:15 ` Jiri Slaby
  2024-02-14 12:58   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2024-02-14  9:15 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, Rengarajan S, linux-serial,
	linux-kernel
  Cc: Kumaravel Thiagarajan, Tharun Kumar P

On 13. 02. 24, 20:38, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Looks good, but hard to tell if it is correct :P.

I like this qt-creator feature: "this header is not directly used, 
remove?". Maybe we could extend it to the kernel somehow (as it uses 
clang to decide, I suppose). As was shown recently, removing the 
inclusion hell can decrease the build time significantly…

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

-- 
js
suse labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_pci1xxxx: Don't use "proxy" headers
  2024-02-14  9:15 ` Jiri Slaby
@ 2024-02-14 12:58   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-02-14 12:58 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Greg Kroah-Hartman, Rengarajan S, linux-serial, linux-kernel,
	Kumaravel Thiagarajan, Tharun Kumar P

On Wed, Feb 14, 2024 at 10:15:10AM +0100, Jiri Slaby wrote:
> On 13. 02. 24, 20:38, Andy Shevchenko wrote:
> > Update header inclusions to follow IWYU (Include What You Use)
> > principle.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Looks good, but hard to tell if it is correct :P.
> 
> I like this qt-creator feature: "this header is not directly used, remove?".
> Maybe we could extend it to the kernel somehow (as it uses clang to decide,
> I suppose). As was shown recently, removing the inclusion hell can decrease
> the build time significantly…

Yes, that's what Ingo's gigantic patch series targeted, but seems no-one is
interested enough to get it through. clang people also wanted to have a tool
like checkpatch for the inclusions or even like coccinelle to just fix the
code, but it's a project with no deadline or milestones AFAIK.

> Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

Thank you!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-14 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 19:38 [PATCH v1 1/1] serial: 8250_pci1xxxx: Don't use "proxy" headers Andy Shevchenko
2024-02-14  9:15 ` Jiri Slaby
2024-02-14 12:58   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).