Skip to contentSkip to conversation

lib: Make SECTION_MISMATCH_WARN_ONLY depend on DEBUG_SECTION_MISMATCH

PATCH In review Michael Ellerman 1 participant 2 messages Apr 5, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: Make SECTION_MISMATCH_WARN_ONLY depend on DEBUG_SECTION_MISMATCH

CONFIG_SECTION_MISMATCH_WARN_ONLY says to turn the errors enabled by CONFIG_DEBUG_SECTION_MISMATCH into warnings. As such there's no need to set the former if the latter is not enabled.

Currently there's no connection between the two, meaning we can end up with this slightly confusing situation:

# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y

So make CONFIG_SECTION_MISMATCH_WARN_ONLY depend on CONFIG_DEBUG_SECTION_MISMATCH.

---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +1 -0
index 64155e310a9f..39209e951010 100644
@@ -337,6 +337,7 @@ config DEBUG_SECTION_MISMATCH
 
 config SECTION_MISMATCH_WARN_ONLY
 	bool "Make section mismatch errors non-fatal"
+	depends on DEBUG_SECTION_MISMATCH
 	default y
 	help
 	  If you say N here, the build process will fail if there are any
Signature · 1 line
2.14.1
#1 lore raw
Quoted 3 lines · Michael Ellerman

CONFIG_SECTION_MISMATCH_WARN_ONLY says to turn the errors enabled by CONFIG_DEBUG_SECTION_MISMATCH into warnings. As such there's no need to set the former if the latter is not enabled.

Wrong. I get it now.

Please ignore this patch.

cheers