diff mbox series

[v2,-next] mtd: spi-nor: fix artificial warning when CONFIG_MTD_CFI_Ix disable

Message ID 20220923085041.1035139-1-zengheng4@huawei.com
State Handled Elsewhere
Delegated to: Ambarus Tudor
Headers show
Series [v2,-next] mtd: spi-nor: fix artificial warning when CONFIG_MTD_CFI_Ix disable | expand

Commit Message

Zeng Heng Sept. 23, 2022, 8:50 a.m. UTC
When CONFIG_SPI_INTEL is selected without
CONFIG_MTD_CFI_I[1,2,4,8] enabled, it would raise
compile warning as below:

In file included from ./include/linux/mtd/spi-nor.h:10,
                 from drivers/spi/spi-intel.c:13:
./include/linux/mtd/cfi.h:62:2:
error: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]
   62 | #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work.
      |  ^~~~~~~

"mtd/cfi.h" is introduced into "mtd/spi-nor.h" by
commit db4745edb282 ("mtd: spi-nor: add SPI NOR manufacturer IDs"),
which was already removed out since from the commit
d3c4bb31bf62 ("mtd: spi-nor: Drop the MFR definitions").

After above, mtd/cfi.h is not more needed by mtd/spi-nor.h,
so detach the dependence.

Fixes: d3c4bb31bf62 ("mtd: spi-nor: Drop the MFR definitions")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Michael Walle <michael@walle.cc>
---
 include/linux/mtd/spi-nor.h | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 42218a1164f6..f92bf7f7a754 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -7,7 +7,6 @@ 
 #define __LINUX_MTD_SPI_NOR_H
 
 #include <linux/bitops.h>
-#include <linux/mtd/cfi.h>
 #include <linux/mtd/mtd.h>
 #include <linux/spi/spi-mem.h>