Skip to content

Commit fe7579d

Browse files
arndbcomputersforpeace
authored andcommitted
mtd: cfi: don't warn about broken geometry for !CONFIG_MTD
The linux/mtd/map.h header file is included by a couple of platform specific files that are built even when CONFIG_MTD is disabled, and we always get warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" in that case. This adds an #ifdef around the pointless warning, as everything is really fine when we don't build the drivers anyway. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent f5f92b3 commit fe7579d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/linux/mtd/map.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@
142142
#endif
143143

144144
#ifndef map_bankwidth
145+
#ifdef CONFIG_MTD
145146
#warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work"
147+
#endif
146148
static inline int map_bankwidth(void *map)
147149
{
148150
BUG();

0 commit comments

Comments
 (0)