Skip to contentSkip to conversation

mtd: map: Don't use "proxy" headers

PATCH Applied Andy Shevchenko 2 participants 2 messages Jun 26, 2025 – Jul 28, 2025 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: map: Don't use "proxy" headers

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

Note that kernel.h is discouraged to be included as it's written at the top of that file.

---
 include/linux/mtd/map.h | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
include/linux/mtd/map.h +7 -6
index 1b56796f6cb3..288ef765a44e 100644
@@ -8,15 +8,15 @@
 #ifndef __LINUX_MTD_MAP_H__
 #define __LINUX_MTD_MAP_H__
 
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/string.h>
 #include <linux/bug.h>
-#include <linux/kernel.h>
 #include <linux/io.h>
-
+#include <linux/ioport.h>
+#include <linux/string.h>
+#include <linux/types.h>
 #include <linux/unaligned.h>
-#include <asm/barrier.h>
+
+struct device_node;
+struct module;
 
 #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1
 #define map_bankwidth(map) 1
@@ -188,6 +188,7 @@ typedef union {
    of living.
 */
 
+struct mtd_chip_driver;
 struct map_info {
 	const char *name;
 	unsigned long size;
Signature · 1 line
2.47.2
maintainer Applied
#1 lore raw
Quoted 8 lines · Andy Shevchenko

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

Note that kernel.h is discouraged to be included as it's written at the top of that file.

[...]

Applied to mtd/next, thanks!

[1/1] mtd: map: Don't use "proxy" headers

      commit: 56eb7c13b97c6f9e2fed9e9899b01d1a6a595f28

Patche(s) should be available on mtd/linux.git and will be part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl