* [PATCH] kconfig: do not overwrite symbol direct dependency in assignment
@ 2011-05-25 5:36 Arnaud Lacombe
2011-05-25 5:42 ` Arnaud Lacombe
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Arnaud Lacombe @ 2011-05-25 5:36 UTC (permalink / raw)
To: linux-kbuild, linux-kernel; +Cc: Arnaud Lacombe
Considering the following configuration:
config F
bool "F"
choice AB
bool "AB"
config A
bool "A"
config B
bool "B"
endchoice
if A
config D
bool
default y if F
select E
config E
bool "E"
endif
if B
config D
bool
default y if F
select E
config E
bool "E"
endif
The following configuration:
CONFIG_F=y
CONFIG_A=y
CONFIG_D=y
CONFIG_E=y
emits a spurious warning:
(D) selects E which has unmet direct dependencies (B)
If a symbol appears in two different branch of the tree, it should inherit the
dependency of both parent, not just the last one.
Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 5fdf10d..d0c65e7 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -350,7 +350,7 @@ void menu_finalize(struct menu *parent)
last_menu->next = NULL;
}
- sym->dir_dep.expr = parent->dep;
+ sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
}
for (menu = parent->list; menu; menu = menu->next) {
if (sym && sym_is_choice(sym) &&
--
1.7.3.4.574.g608b.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kconfig: do not overwrite symbol direct dependency in assignment
2011-05-25 5:36 [PATCH] kconfig: do not overwrite symbol direct dependency in assignment Arnaud Lacombe
@ 2011-05-25 5:42 ` Arnaud Lacombe
2011-05-31 22:56 ` Arnaud Lacombe
2011-06-08 5:42 ` Arnaud Lacombe
2 siblings, 0 replies; 5+ messages in thread
From: Arnaud Lacombe @ 2011-05-25 5:42 UTC (permalink / raw)
To: linux-kbuild, linux-kernel; +Cc: Arnaud Lacombe
Hi,
On Wed, May 25, 2011 at 1:36 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Considering the following configuration:
>
> config F
> bool "F"
>
> choice AB
> bool "AB"
> config A
> bool "A"
> config B
> bool "B"
> endchoice
>
> if A
> config D
> bool
> default y if F
> select E
> config E
> bool "E"
> endif
>
> if B
> config D
> bool
> default y if F
> select E
> config E
> bool "E"
> endif
>
> The following configuration:
>
> CONFIG_F=y
> CONFIG_A=y
> CONFIG_D=y
> CONFIG_E=y
>
d'oh! this should have read:
CONFIG_F=y
CONFIG_A=y
# CONFIG_B is not set
CONFIG_D=y
CONFIG_E=y
but I missed the leading space, and git decided to eat the assignment
of CONFIG_B.
sorry about that,
- Arnaud
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kconfig: do not overwrite symbol direct dependency in assignment
2011-05-25 5:36 [PATCH] kconfig: do not overwrite symbol direct dependency in assignment Arnaud Lacombe
2011-05-25 5:42 ` Arnaud Lacombe
@ 2011-05-31 22:56 ` Arnaud Lacombe
2011-06-08 5:42 ` Arnaud Lacombe
2 siblings, 0 replies; 5+ messages in thread
From: Arnaud Lacombe @ 2011-05-31 22:56 UTC (permalink / raw)
To: linux-kbuild, linux-kernel, Michal Marek
Hi,
On Wed, May 25, 2011 at 1:36 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Considering the following configuration:
>
> config F
> bool "F"
>
> choice AB
> bool "AB"
> config A
> bool "A"
> config B
> bool "B"
> endchoice
>
> if A
> config D
> bool
> default y if F
> select E
> config E
> bool "E"
> endif
>
> if B
> config D
> bool
> default y if F
> select E
> config E
> bool "E"
> endif
>
> The following configuration:
>
> CONFIG_F=y
> CONFIG_A=y
> CONFIG_D=y
> CONFIG_E=y
>
> emits a spurious warning:
>
> (D) selects E which has unmet direct dependencies (B)
>
> If a symbol appears in two different branch of the tree, it should inherit the
> dependency of both parent, not just the last one.
>
> Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
> Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> ---
> scripts/kconfig/menu.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
ping ?
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 5fdf10d..d0c65e7 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -350,7 +350,7 @@ void menu_finalize(struct menu *parent)
> last_menu->next = NULL;
> }
>
> - sym->dir_dep.expr = parent->dep;
> + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
> }
> for (menu = parent->list; menu; menu = menu->next) {
> if (sym && sym_is_choice(sym) &&
> --
> 1.7.3.4.574.g608b.dirty
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] kconfig: do not overwrite symbol direct dependency in assignment
2011-05-25 5:36 [PATCH] kconfig: do not overwrite symbol direct dependency in assignment Arnaud Lacombe
2011-05-25 5:42 ` Arnaud Lacombe
2011-05-31 22:56 ` Arnaud Lacombe
@ 2011-06-08 5:42 ` Arnaud Lacombe
2011-06-24 15:25 ` Michal Marek
2 siblings, 1 reply; 5+ messages in thread
From: Arnaud Lacombe @ 2011-06-08 5:42 UTC (permalink / raw)
To: linux-kbuild, linux-kernel; +Cc: Michal Marek, Arnaud Lacombe
Hi Michal,
Re-sent, mostly to have the commit log right.
Regards,
- Arnaud
---
From: Arnaud Lacombe <lacombar@gmail.com>
Considering the following configuration:
config F
bool "F"
choice AB
bool "AB"
config A
bool "A"
config B
bool "B"
endchoice
if A
config D
bool
default y if F
select E
config E
bool "E"
endif
if B
config D
bool
default y if F
select E
config E
bool "E"
endif
The following configuration:
CONFIG_F=y
CONFIG_A=y
# CONFIG_B is not set
CONFIG_D=y
CONFIG_E=y
emits a spurious warning:
(D) selects E which has unmet direct dependencies (B)
If a symbol appears in two different branch of the tree, it should inherit the
dependency of both parent, not just the last one.
Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 5fdf10d..d0c65e7 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -350,7 +350,7 @@ void menu_finalize(struct menu *parent)
last_menu->next = NULL;
}
- sym->dir_dep.expr = parent->dep;
+ sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
}
for (menu = parent->list; menu; menu = menu->next) {
if (sym && sym_is_choice(sym) &&
--
1.7.3.4.574.g608b.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kconfig: do not overwrite symbol direct dependency in assignment
2011-06-08 5:42 ` Arnaud Lacombe
@ 2011-06-24 15:25 ` Michal Marek
0 siblings, 0 replies; 5+ messages in thread
From: Michal Marek @ 2011-06-24 15:25 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: linux-kbuild, linux-kernel
On Wed, Jun 08, 2011 at 01:42:11AM -0400, Arnaud Lacombe wrote:
> Hi Michal,
>
> Re-sent, mostly to have the commit log right.
>
> Regards,
> - Arnaud
>
> ---
> From: Arnaud Lacombe <lacombar@gmail.com>
>
> Considering the following configuration:
Applied to kbuild-2.6.git#kconfig, thanks.
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-24 15:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 5:36 [PATCH] kconfig: do not overwrite symbol direct dependency in assignment Arnaud Lacombe
2011-05-25 5:42 ` Arnaud Lacombe
2011-05-31 22:56 ` Arnaud Lacombe
2011-06-08 5:42 ` Arnaud Lacombe
2011-06-24 15:25 ` Michal Marek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.