Commit graph android_kernel_sony_sdm845/scripts/kconfig
Message SHA1
kconfig/conf: mark xfgets() private
This function has not much reason to be public. In the mean time, convert
declaration from K&R C to ISO C.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-07-02 01:04:40 -04:00
ab63f58f25
kconfig: remove pending prototypes for kconfig_load()
Commit 5a6f8d2bd9 removed `kconfig_load()',
however, it missed an hidden prototypes in `lkc.h'. Fix this.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-07-02 01:04:39 -04:00
131c60a95e
kconfig/conf: add command line options' description
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-07-02 01:04:39 -04:00
32543999f3
kconfig/conf: reduce the scope of `defconfig_file'
This variable is not used outside of main() so there is not much reason keeping
it global. Ensure it is initialized as gcc has no way to know that normal
execution path expect only one option switch to be given on the command line
(except when we request help). As a result, we always initialize
`defconfig_file' before using it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-07-02 01:04:38 -04:00
275744cc8d
kconfig: use calloc() for expr allocation
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-07-02 01:04:37 -04:00
8494453ad5
kconfig: introduce specialized printer
Make conf_write_symbol() grammar agnostic to be able to use it from different
code path. These path pass a printer callback which will print a symbol's name
and its value in different format.

conf_write_symbol()'s job become mostly only to prepare a string for the
printer. This avoid to have to pass specialized flag to generic
functions

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
[mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
macro)]
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2011-07-01 16:23:27 +02:00
e54e692ba6
kconfig: do not overwrite symbol direct dependency in assignment
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>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2011-06-24 17:21:27 +02:00
ec6452a5ec
kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-09 14:04:45 -04:00
2f76b358f9
kconfig: migrate parser to implicit rules
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-09 14:04:44 -04:00
378dbb2cf5
kconfig/zconf.l: do not ask to generate backup
This avoids the creation of a top-level `lex.backup' when the lexer gets
re-generated.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-09 14:04:44 -04:00
674eed8a6a
kconfig: kill no longer needed reference to YYDEBUG
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-09 14:04:43 -04:00
b96a0d0c78
kconfig: constify `kconf_id_lookup'
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-09 14:04:42 -04:00
61f956f576
Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig
Michal Marek   commited 2011-06-08 18:03:57 +02:00
36fee53510
kconfig/gconf: silent missing prototype warnings
As the `gconf' frontend is un-maintained, go the easy way by silencing
the "warning: no previous prototype for '<fn>'" warnings.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:23 -04:00
1ea3ad4e93
kconfig/gconf: kill deadcode
The only call site of renderer_toggled() has been commented out since Apr. 2003,
as per Linus' Linux history repository:

 commit e7f67eb3c0570aa50c1cc0707b478a6d93bdc255
 Author: Roman Zippel <zippel@linux-m68k.org>
 Date:   Fri Apr 4 04:18:05 2003 -0800

    [PATCH] gconf update

    A gconf update by Romain Li<C3><A9>vin <roms@tilp.info>
    - fixed bug when double-clicking for changing value.
    - expand row when enabling a row with a submenu.
    - various bug fixes

As this result in a warning:

scripts/kconfig/gconf.c:891:13: warning: 'renderer_toggled' defined but not used

just nuke that code.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:22 -04:00
f8aea775c1
kconfig: nuke LKC_DIRECT_LINK cruft
This interface is not (and has never been ?) used by any frontend, just get rid
of it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:20 -04:00
5a6f8d2bd9
kconfig: nuke reference to SWIG
SWIG is not used (yet?) to create kconfig binding, so there is no point
referencing it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:18 -04:00
84250386ef
kconfig: add missing <stdlib.h> inclusion
This header is needed when using {m,re}alloc(3) and free(3) function family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:16 -04:00
02d95c96c3
kconfig: add missing <ctype.h> inclusion
This header is needed when using isspace(3) function family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:15 -04:00
dd003306a4
kconfig: add missing <stdarg.h> inclusion
This header is needed when using va_{start,end,copy}(3) functions family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:13 -04:00
10a4b2772e
kconfig: fix return code for invalid boolean symbol in conf_set_sym_val()
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:11 -04:00
75f1468bea
kconfig: annotate non-trivial fall-trough
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Arnaud Lacombe   commited 2011-06-06 15:32:10 -04:00
d8fc320079
Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig
Michal Marek   commited 2011-05-25 15:33:20 +02:00
ac9a126571
kconfig: Only generate config_is_xxx for bool and tristate options
For strings and integers, the config_is_xxx macros are useless and
sometimes misleading:

  #define CONFIG_INITRAMFS_SOURCE ""
  #define config_is_initramfs_source() 1

Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Michal Marek   commited 2011-05-25 15:26:25 +02:00
4c54f0f846
xconfig: merge code path to conf_write()
Avoid to have multiple path saving the config. This fixes an error check
miss when the window is being closed and the user requested the config
to be written.

Reported-by: Hiromu Yakura <hiromu1996@gmail.com>
Pointed-out-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2011-05-25 15:05:07 +02:00
d49e46875c
Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig
Michal Marek   commited 2011-05-24 17:16:21 +02:00
51f31afd12
kconfig: do not record timestamp in .config
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2011-05-24 16:13:40 +02:00
bdebd4892e
gconfig: Hide unused left treeview when start up the interface
When the gconfig program starts in full mode view, it shows the
left treeview which belongs to the 'split mode view'. The patch
fix this visual issue.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Eduardo Silva   authored and   Michal Marek   commited 2011-05-24 15:41:51 +02:00
6ef3d36eee
gconfig: enable rules hint for main treeviews
Due to the large amount of rows in the treeviews, is difficult to
match columns with rows, setting the rules hint to 'true' allows the
treeview to alternate background colors in the rows making the data
more readable.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Eduardo Silva   authored and   Michal Marek   commited 2011-05-24 15:41:51 +02:00
2626e67402
kconfig: autogenerated config_is_xxx macro
this will allow to use to use

	if(config_is_xxx())
	if(config_is_xxx_module())

in the code instead of

	#ifdef CONFIG_xxx
	#ifdef CONFIG_xxx_MODULE

and now let the compiler remove the non usefull code and not the
pre-processor

as done in the mach-types for arm as exmaple

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Jean-Christophe PLAGNIOL-VILLARD   authored and   Michal Marek   commited 2011-05-17 15:59:23 +02:00
de125187dc
kconfig: quiet commands when V=0
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:41:15 +02:00
2d80eb0fa3
kconfig: change update-po-config to reflect new layout of arch/um
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:41:02 +02:00
bdc69ca4cf
kconfig: make update-po-config work in KBUILD_OUTPUT
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:40:45 +02:00
a24a1b8e2a
kconfig: rearrange clean-files
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:40:33 +02:00
b24d7d7b98
kconfig: change gconf to modify hostprogs-y like nconf and mconf
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:40:16 +02:00
d02ab886dc
kconfig: change qconf to modify hostprogs-y like nconf and mconf
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:39:44 +02:00
f19430496a
kconfig: only build kxgettext when needed
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Foley   authored and   Michal Marek   commited 2011-04-29 10:39:11 +02:00
1f594715bd
nconfig: Silence unused return values from wattrset
Ignore the return value from wattrset since we ignore the return
value in nconf.gui.c as well.

scripts/kconfig/nconf.c: In function 'print_function_line':
scripts/kconfig/nconf.c:376: warning: value computed is not used
scripts/kconfig/nconf.c:380: warning: value computed is not used
scripts/kconfig/nconf.c:387: warning: value computed is not used
scripts/kconfig/nconf.c: In function 'show_menu':
scripts/kconfig/nconf.c:956: warning: value computed is not used
scripts/kconfig/nconf.c:961: warning: value computed is not used
scripts/kconfig/nconf.c:963: warning: value computed is not used
scripts/kconfig/nconf.c:965: warning: value computed is not used

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Stephen Boyd   authored and   Michal Marek   commited 2011-04-19 09:21:52 +02:00
10175ba65f
kconfig: Do not record timestamp in auto.conf and autoconf.h
Timestamps in file data are useless and there is already one in .config

Signed-off-by: Michal Marek <mmarek@suse.cz>

Michal Marek   commited 2011-04-18 14:20:38 +02:00
c33724a438
kconfig: get rid of unused flags
Now that we detect recusrion of sourced files, get rid of
now unused flags.

Regenerate lex.zconf.c_shipped file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Yann E. MORIN   authored and   Michal Marek   commited 2011-04-15 15:12:57 +02:00
2b2112f617
kconfig: allow multiple inclusion of the same file
Allow 'source'ing the same file from multiple places (eg. from
different files, and/or under different conditions).

To avoid circular inclusion, scan the source-ancestry of the
current file, and abort if already sourced in this branch.

Regenerate the pre-parsed lex.zconf.c_shipped file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Yann E. MORIN   authored and   Michal Marek   commited 2011-04-15 15:12:48 +02:00
f094f8a1b2
kconfig: Avoid buffer underrun in choice input
commit 40aee729b3 ('kconfig: fix default
value for choice input') fixed some cases where kconfig would select
the wrong option from a choice with a single valid option and thus
enter an infinite loop.

However, this broke the test for user input of the form 'N?', because
when kconfig selects the single valid option the input is zero-length
and the test will read the byte before the input buffer.  If this
happens to contain '?' (as it will in a mips build on Debian unstable
today) then kconfig again enters an infinite loop.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org [2.6.17+]
Signed-off-by: Michal Marek <mmarek@suse.cz>

Ben Hutchings   authored and   Michal Marek   commited 2011-04-08 12:05:20 +02:00
466de91835
trivial: Fix Steven's Copyright typos
OK, the copyright allows you to write a copy, still I think the lawyers
prefer the correct spelling.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
LKML-Reference: <1295899921-11333-1-git-send-email-u.kleine-koenig@pengutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Uwe Kleine-König   authored and   Steven Rostedt   commited 2011-02-08 17:14:31 -05:00
cce1dac871
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  nconf: handle comment entries within choice/endchoice
  kconfig: fix warning
  kconfig: Make expr_copy() take a const argument
  kconfig: simplify select-with-unmet-direct-dependency warning
  kconfig: add more S_INT and S_HEX consistency checks
  kconfig: fix `zconfdebug' extern declaration
  kconfig/conf: merge duplicate switch's case
  kconfig: fix typos
  kbuild/gconf: add dummy inline for bind_textdomain_codeset()
  kbuild/nconf: fix spaces damage
  kconfig: nuke second argument of conf_write_symbol()
  kconfig: do not define AUTOCONF_INCLUDED
  kconfig: the day kconfig warns about "select"-abuse has come

Linus Torvalds   commited 2011-01-10 08:28:17 -08:00
f28b1c8aaa
nconf: handle comment entries within choice/endchoice
Equivalent to af6c1598 (kconfig: handle comment entries within
choice/endchoice), but for nconfig instead.

Implement support for comment entries within choice groups. Comment entries
are displayed visually distinct from normal configs, and selecting them is
a no-op.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Peter Korsgaard   authored and   Michal Marek   commited 2011-01-07 15:45:28 +01:00
39177ec362
kconfig: fix undesirable side effect of adding "visible" menu attribute
This lead to non-selected, non-user-selectable options to be written
out to .config. This is not only pointless, but also preventing the
user to be prompted should any of those options eventually become
visible (e.g. by de-selecting the *_AUTO options the "visible"
attribute was added for.

Furthermore it is quite logical for the "visible" attribute of a menu
to control the visibility of all contained prompts, which is what the
patch does.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Jan Beulich   authored and   Michal Marek   commited 2010-12-29 23:31:34 +01:00
7ad1227818
kconfig: fix warning
In file included from scripts/kconfig/zconf.tab.c:2502:
scripts/kconfig/expr.c:1033: warning: no previous prototype for 'expr_simplify_unmet_dep'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2010-12-27 21:46:47 +01:00
0597fcd08b
kconfig: Make expr_copy() take a const argument
Fixes
scripts/kconfig/expr.c: In function ‘expr_get_leftmost_symbol’:
scripts/kconfig/expr.c:1026:2: warning: passing argument 1 of ‘expr_copy’ discards qualifiers from pointer target type
scripts/kconfig/expr.c:67:14: note: expected ‘struct expr *’ but argument is of type ‘const struct expr *’

Signed-off-by: Michal Marek <mmarek@suse.cz>

Michal Marek   commited 2010-12-21 17:59:16 +01:00
17742dc743
kconfig: simplify select-with-unmet-direct-dependency warning
This is an attempt to simplify the expressing printed by kconfig when a
symbol is selected but still has direct unmet dependency.

First, the symbol reverse dependency is split in sub-expression. Then,
each sub-expression is checked to ensure that it does not contains the
unmet dependency. This removes the false-positive symbols and fixed symbol
which already have the correct dependency. Finally, only the symbol
responsible of the "select" is printed, instead of its full dependency tree.

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2010-12-21 17:59:14 +01:00
1137c56b74
kconfig: add more S_INT and S_HEX consistency checks
This patch add more number consistency checkg, trying to catch the following
situation:

config FOO0
	hex
	default 42

config FOO1
	string

config BAR0
	int
	default FOO1

config BAR1
	hex
	default FOO1

config FOO2
	hex
	default 42h

config FOO3
	int
	default "1bar"

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Arnaud Lacombe   authored and   Michal Marek   commited 2010-12-15 23:15:32 +01:00
ab60bd0b92