linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kconfig: return 'false' instead of 'no' in bool function
@ 2016-01-01 16:34 Vegard Nossum
  2016-01-05 10:20 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Vegard Nossum @ 2016-01-01 16:34 UTC (permalink / raw)
  To: Yann E. MORIN, Michal Marek
  Cc: linux-kbuild, Vegard Nossum, Arnaud Lacombe,
	Mauro Carvalho Chehab

menu_is_visible() is a bool function and should use boolean return
values. "no" is a tristate value which happens to also have a value
of 0, but we should nevertheless use the right symbol for it.

This is a very minor cleanup with no semantic change.

Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
 scripts/kconfig/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index b05cc3d..aed678e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -477,7 +477,7 @@ bool menu_is_visible(struct menu *menu)
 
 	if (menu->visibility) {
 		if (expr_calc_value(menu->visibility) == no)
-			return no;
+			return false;
 	}
 
 	sym = menu->sym;
-- 
1.9.1


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

* Re: [PATCH] kconfig: return 'false' instead of 'no' in bool function
  2016-01-01 16:34 [PATCH] kconfig: return 'false' instead of 'no' in bool function Vegard Nossum
@ 2016-01-05 10:20 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-01-05 10:20 UTC (permalink / raw)
  To: Vegard Nossum, Yann E. MORIN
  Cc: linux-kbuild, Arnaud Lacombe, Mauro Carvalho Chehab

On 2016-01-01 17:34, Vegard Nossum wrote:
> menu_is_visible() is a bool function and should use boolean return
> values. "no" is a tristate value which happens to also have a value
> of 0, but we should nevertheless use the right symbol for it.
> 
> This is a very minor cleanup with no semantic change.
> 
> Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
> Cc: Arnaud Lacombe <lacombar@gmail.com>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>

Thanks, applied to kbuild.git#kconfig.

Michal


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

end of thread, other threads:[~2016-01-05 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-01 16:34 [PATCH] kconfig: return 'false' instead of 'no' in bool function Vegard Nossum
2016-01-05 10:20 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).