Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option.
@ 2011-08-02 19:03 Srinivas KANDAGATLA
  2011-08-02 19:30 ` Arnaud Lacombe
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas KANDAGATLA @ 2011-08-02 19:03 UTC (permalink / raw)
  To: linux-kbuild; +Cc: stuart.menefy, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@st.com>

Help text under choice menu is never displayed because it does not have
symbol name associated with it, however many kconfigs have help text
under choice, assuming that it will be displayed when user selects help.

This patch changes the logic in menu_get_ext_help to display help for
cases which dont have symbol names like choice..

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
---

To see this bug in action, go to "PCI access mode" under PCI support, and hit the
help button. You will see no help text displayed. However in  arch/x86/Kconfig under 
"PCI access mode" there is help section.

Help text under choice menu is never displayed because it does not have symbol name 
associated with it, however many kconfigs have help text under choice, assuming 
that it will be displayed when user selects help.

This patch changes the logic in menu_get_ext_help to display help for cases which 
dont have symbol names like choice.


 scripts/kconfig/menu.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index d660086..beeb92e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -597,11 +597,10 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
 	struct symbol *sym = menu->sym;
 
 	if (menu_has_help(menu)) {
-		if (sym->name) {
+		if (sym->name)
 			str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
-			str_append(help, _(menu_get_help(menu)));
-			str_append(help, "\n");
-		}
+		str_append(help, _(menu_get_help(menu)));
+		str_append(help, "\n");
 	} else {
 		str_append(help, nohelp_text);
 	}
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option.
  2011-08-02 19:03 [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option Srinivas KANDAGATLA
@ 2011-08-02 19:30 ` Arnaud Lacombe
  2011-08-03  9:36   ` Srinivas KANDAGATLA
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaud Lacombe @ 2011-08-02 19:30 UTC (permalink / raw)
  To: Srinivas KANDAGATLA; +Cc: linux-kbuild, stuart.menefy

Hi,

On Tue, Aug 2, 2011 at 3:03 PM, Srinivas KANDAGATLA
<srinivas.kandagatla@st.com> wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> Help text under choice menu is never displayed because it does not have
> symbol name associated with it, however many kconfigs have help text
> under choice, assuming that it will be displayed when user selects help.
>
> This patch changes the logic in menu_get_ext_help to display help for
> cases which dont have symbol names like choice..
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
>
could you please provide a reduced testcase included in the changelog
? That will avoid people looking at the bug later on to figure out
what caused the issue. The following snippet :

choice
        prompt "Choice"
        ---help---
           HELP TEXT ...

config A
        bool "A"

config B
        bool "B"

endchoice

should be enough, as the problem is caused by "anonymous" choice.

> ---
>
> To see this bug in action, go to "PCI access mode" under PCI support, and hit the
> help button. You will see no help text displayed. However in  arch/x86/Kconfig under
> "PCI access mode" there is help section.
>
> Help text under choice menu is never displayed because it does not have symbol name
> associated with it, however many kconfigs have help text under choice, assuming
> that it will be displayed when user selects help.
>
> This patch changes the logic in menu_get_ext_help to display help for cases which
> dont have symbol names like choice.
>
that look good to me.

Thanks,
 - Arnaud

ps: do you consider Cc: for stable@ ?

>
>  scripts/kconfig/menu.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index d660086..beeb92e 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -597,11 +597,10 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
>        struct symbol *sym = menu->sym;
>
>        if (menu_has_help(menu)) {
> -               if (sym->name) {
> +               if (sym->name)
>                        str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
> -                       str_append(help, _(menu_get_help(menu)));
> -                       str_append(help, "\n");
> -               }
> +               str_append(help, _(menu_get_help(menu)));
> +               str_append(help, "\n");
>        } else {
>                str_append(help, nohelp_text);
>        }
> --
> 1.6.3.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option.
  2011-08-02 19:30 ` Arnaud Lacombe
@ 2011-08-03  9:36   ` Srinivas KANDAGATLA
  2011-08-04  1:37     ` Arnaud Lacombe
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas KANDAGATLA @ 2011-08-03  9:36 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kbuild, stuart.menefy

[-- Attachment #1: Type: text/plain, Size: 2992 bytes --]


Hi Arnaud,
Thankyou for the comments,
Here is the new patch with comments included.

Thanks,
srini

Arnaud Lacombe wrote:
> Hi,
>
> On Tue, Aug 2, 2011 at 3:03 PM, Srinivas KANDAGATLA
> <srinivas.kandagatla@st.com> wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>>
>> Help text under choice menu is never displayed because it does not have
>> symbol name associated with it, however many kconfigs have help text
>> under choice, assuming that it will be displayed when user selects help.
>>
>> This patch changes the logic in menu_get_ext_help to display help for
>> cases which dont have symbol names like choice..
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>> Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
>>
> could you please provide a reduced testcase included in the changelog
> ? That will avoid people looking at the bug later on to figure out
> what caused the issue. The following snippet :
>
> choice
>         prompt "Choice"
>         ---help---
>            HELP TEXT ...
>
> config A
>         bool "A"
>
> config B
>         bool "B"
>
> endchoice
>
> should be enough, as the problem is caused by "anonymous" choice.
>
>> ---
>>
>> To see this bug in action, go to "PCI access mode" under PCI support, and hit the
>> help button. You will see no help text displayed. However in  arch/x86/Kconfig under
>> "PCI access mode" there is help section.
>>
>> Help text under choice menu is never displayed because it does not have symbol name
>> associated with it, however many kconfigs have help text under choice, assuming
>> that it will be displayed when user selects help.
>>
>> This patch changes the logic in menu_get_ext_help to display help for cases which
>> dont have symbol names like choice.
>>
> that look good to me.
>
> Thanks,
>  - Arnaud
>
> ps: do you consider Cc: for stable@ ?
>
>>  scripts/kconfig/menu.c |    7 +++----
>>  1 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
>> index d660086..beeb92e 100644
>> --- a/scripts/kconfig/menu.c
>> +++ b/scripts/kconfig/menu.c
>> @@ -597,11 +597,10 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
>>        struct symbol *sym = menu->sym;
>>
>>        if (menu_has_help(menu)) {
>> -               if (sym->name) {
>> +               if (sym->name)
>>                        str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
>> -                       str_append(help, _(menu_get_help(menu)));
>> -                       str_append(help, "\n");
>> -               }
>> +               str_append(help, _(menu_get_help(menu)));
>> +               str_append(help, "\n");
>>        } else {
>>                str_append(help, nohelp_text);
>>        }
>> --
>> 1.6.3.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>


[-- Attachment #2: 0001-kbuild-Fix-help-text-not-displayed-in-choice-option.patch --]
[-- Type: text/x-patch, Size: 1715 bytes --]

From 7d1c644b41f246b897db40384618520787445328 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Date: Tue, 2 Aug 2011 18:49:52 +0100
Subject: [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option.

Help text under choice menu is never displayed because it does not have
symbol name associated with it, however many kconfigs have help text
under choice, assuming that it will be displayed when user selects help.
for example in Kconfig if we have:
choice
        prompt "Choice"
        ---help---
           HELP TEXT ...

config A
        bool "A"

config B
        bool "B"

endchoice

Without this patch "HELP TEXT" is not displayed when user selects help option 
when "Choice" is highlighted from menuconfig or xconfig or gconfig.

This patch changes the logic in menu_get_ext_help to display help for
cases which dont have symbol names like choice.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
---

 scripts/kconfig/menu.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index d660086..beeb92e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -597,11 +597,10 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
 	struct symbol *sym = menu->sym;
 
 	if (menu_has_help(menu)) {
-		if (sym->name) {
+		if (sym->name)
 			str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
-			str_append(help, _(menu_get_help(menu)));
-			str_append(help, "\n");
-		}
+		str_append(help, _(menu_get_help(menu)));
+		str_append(help, "\n");
 	} else {
 		str_append(help, nohelp_text);
 	}
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option.
  2011-08-03  9:36   ` Srinivas KANDAGATLA
@ 2011-08-04  1:37     ` Arnaud Lacombe
  2011-08-08 14:03       ` Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaud Lacombe @ 2011-08-04  1:37 UTC (permalink / raw)
  To: srinivas.kandagatla, Michal Marek; +Cc: linux-kbuild, stuart.menefy

Hi,

On Wed, Aug 3, 2011 at 5:36 AM, Srinivas KANDAGATLA
<srinivas.kandagatla@st.com> wrote:
>
> Hi Arnaud,
> Thankyou for the comments,
> Here is the new patch with comments included.
>
Reviewed-by: Arnaud Lacombe <lacombar@gmail.com>

Michal, can you pick that for 3.1-rc1 or 3.1-rc2 ?

Thanks,
 - Arnaud

> Thanks,
> srini
>
> Arnaud Lacombe wrote:
>> Hi,
>>
>> On Tue, Aug 2, 2011 at 3:03 PM, Srinivas KANDAGATLA
>> <srinivas.kandagatla@st.com> wrote:
>>> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>>>
>>> Help text under choice menu is never displayed because it does not have
>>> symbol name associated with it, however many kconfigs have help text
>>> under choice, assuming that it will be displayed when user selects help.
>>>
>>> This patch changes the logic in menu_get_ext_help to display help for
>>> cases which dont have symbol names like choice..
>>>
>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>>> Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
>>>
>> could you please provide a reduced testcase included in the changelog
>> ? That will avoid people looking at the bug later on to figure out
>> what caused the issue. The following snippet :
>>
>> choice
>>         prompt "Choice"
>>         ---help---
>>            HELP TEXT ...
>>
>> config A
>>         bool "A"
>>
>> config B
>>         bool "B"
>>
>> endchoice
>>
>> should be enough, as the problem is caused by "anonymous" choice.
>>
>>> ---
>>>
>>> To see this bug in action, go to "PCI access mode" under PCI support, and hit the
>>> help button. You will see no help text displayed. However in  arch/x86/Kconfig under
>>> "PCI access mode" there is help section.
>>>
>>> Help text under choice menu is never displayed because it does not have symbol name
>>> associated with it, however many kconfigs have help text under choice, assuming
>>> that it will be displayed when user selects help.
>>>
>>> This patch changes the logic in menu_get_ext_help to display help for cases which
>>> dont have symbol names like choice.
>>>
>> that look good to me.
>>
>> Thanks,
>>  - Arnaud
>>
>> ps: do you consider Cc: for stable@ ?
>>
>>>  scripts/kconfig/menu.c |    7 +++----
>>>  1 files changed, 3 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
>>> index d660086..beeb92e 100644
>>> --- a/scripts/kconfig/menu.c
>>> +++ b/scripts/kconfig/menu.c
>>> @@ -597,11 +597,10 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
>>>        struct symbol *sym = menu->sym;
>>>
>>>        if (menu_has_help(menu)) {
>>> -               if (sym->name) {
>>> +               if (sym->name)
>>>                        str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
>>> -                       str_append(help, _(menu_get_help(menu)));
>>> -                       str_append(help, "\n");
>>> -               }
>>> +               str_append(help, _(menu_get_help(menu)));
>>> +               str_append(help, "\n");
>>>        } else {
>>>                str_append(help, nohelp_text);
>>>        }
>>> --
>>> 1.6.3.3
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option.
  2011-08-04  1:37     ` Arnaud Lacombe
@ 2011-08-08 14:03       ` Michal Marek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Marek @ 2011-08-08 14:03 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: srinivas.kandagatla, linux-kbuild, stuart.menefy

On Wed, Aug 03, 2011 at 09:37:08PM -0400, Arnaud Lacombe wrote:
> Hi,
> 
> On Wed, Aug 3, 2011 at 5:36 AM, Srinivas KANDAGATLA
> <srinivas.kandagatla@st.com> wrote:
> >
> > Hi Arnaud,
> > Thankyou for the comments,
> > Here is the new patch with comments included.
> >
> Reviewed-by: Arnaud Lacombe <lacombar@gmail.com>
> 
> Michal, can you pick that for 3.1-rc1 or 3.1-rc2 ?

I applied it with a Cc: stable@kernel.org.

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-08 14:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02 19:03 [PATCH kernel-3.0] kbuild: Fix help text not displayed in choice option Srinivas KANDAGATLA
2011-08-02 19:30 ` Arnaud Lacombe
2011-08-03  9:36   ` Srinivas KANDAGATLA
2011-08-04  1:37     ` Arnaud Lacombe
2011-08-08 14:03       ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox