diff mbox series

fixdep: fix dependency on options surrounded by CONFIG_VAL()

Message ID 1507253083-18367-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 7d8e9e8e24b247944bbff6ab68e03cac81fde218
Headers show
Series fixdep: fix dependency on options surrounded by CONFIG_VAL() | expand

Commit Message

Masahiro Yamada Oct. 6, 2017, 1:24 a.m. UTC
CONFIG options surrounded by

  CONFIG_IS_ENABLED(...)
  CONFIG_IS_BUILTIN(...)
  CONFIG_IS_MODULE(...)
  CONFIG_VAL(...)

need special care for proper dependency tracking.

I do not remember why, but I missed to add CONFIG_VAL(...) handling.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/basic/fixdep.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Tom Rini Oct. 17, 2017, 12:46 a.m. UTC | #1
On Fri, Oct 06, 2017 at 10:24:43AM +0900, Masahiro Yamada wrote:

> CONFIG options surrounded by

> 

>   CONFIG_IS_ENABLED(...)

>   CONFIG_IS_BUILTIN(...)

>   CONFIG_IS_MODULE(...)

>   CONFIG_VAL(...)

> 

> need special care for proper dependency tracking.

> 

> I do not remember why, but I missed to add CONFIG_VAL(...) handling.

> 

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 9bd0de2..da7fb2c 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -249,10 +249,17 @@  static void parse_config_file(const char *map, size_t len)
 		if (q - p < 0)
 			continue;
 
-		/* U-Boot also handles CONFIG_IS_{ENABLED/BUILTIN/MODULE} */
+		/*
+		 * U-Boot also handles
+		 *   CONFIG_IS_ENABLED(...)
+		 *   CONFIG_IS_BUILTIN(...)
+		 *   CONFIG_IS_MODULE(...)
+		 *   CONFIG_VAL(...)
+		 */
 		if ((q - p == 10 && !memcmp(p, "IS_ENABLED(", 11)) ||
 		    (q - p == 10 && !memcmp(p, "IS_BUILTIN(", 11)) ||
-		    (q - p == 9 && !memcmp(p, "IS_MODULE(", 10))) {
+		    (q - p == 9 && !memcmp(p, "IS_MODULE(", 10)) ||
+		    (q - p == 3 && !memcmp(p, "VAL(", 4))) {
 			p = q + 1;
 			for (q = p; q < map + len; q++)
 				if (*q == ')')