* [PATCH v2 -next] mtd: spi-nor: fix artificial warning when CONFIG_MTD_CFI_Ix disable
@ 2022-09-23 8:50 Zeng Heng
0 siblings, 0 replies; only message in thread
From: Zeng Heng @ 2022-09-23 8:50 UTC (permalink / raw)
To: tudor.ambarus, pratyush, michael, miquel.raynal, richard,
vigneshr, boris.brezillon
Cc: linux-mtd, liwei391, zengheng4
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 --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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-23 8:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 8:50 [PATCH v2 -next] mtd: spi-nor: fix artificial warning when CONFIG_MTD_CFI_Ix disable Zeng Heng
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).