[PATCH v2 -next] mtd: spi-nor: fix artificial warning when CONFIG_MTD_CFI_Ix disable
Zeng Heng
zengheng4 at huawei.com
Fri Sep 23 01:50:41 PDT 2022
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 at huawei.com>
Reviewed-by: Michael Walle <michael at walle.cc>
---
include/linux/mtd/spi-nor.h | 1 -
1 file changed, 1 deletion(-)
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>
--
2.25.1
More information about the linux-mtd
mailing list