19 Aug, 2015
1 commit
-
The sym_calc_value() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Michal Marek
25 Feb, 2015
1 commit
-
Signed-off-by: Michal Marek
27 Jan, 2015
1 commit
-
Although on some systems va_end is a no-op, it is good practice
to use va_end, especially since the manual states:"Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function."Signed-off-by: Colin Ian King
Signed-off-by: Michal Marek
08 Apr, 2014
1 commit
-
"make allnoconfig" exists to ease testing of minimal configurations.
Documentation/SubmitChecklist includes a note to test with allnoconfig.
This helps catch missing dependencies on common-but-not-required
functionality, which might otherwise go unnoticed.However, allnoconfig still leaves many symbols enabled, because they're
hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT. For instance, allnoconfig
still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't
typically get build-tested with those disabled.To address this, introduce a new Kconfig option "allnoconfig_y", used on
symbols which only exist to hide other symbols. Set it on CONFIG_EMBEDDED
(which then selects CONFIG_EXPERT). allnoconfig will then disable all the
symbols hidden behind those.Signed-off-by: Josh Triplett
Tested-by: Paul E. McKenney
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Aug, 2013
1 commit
-
When a symbol changes type from tristate to bool, and was previously set to
'm', a subsequent silentoldconfig would warn about inconsistency, such as:include/config/auto.conf:3014:warning: symbol value 'm' invalid for
HOTPLUG_PCI_PCIESeen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
git checkout 1fe0135
make mrproper
make allmodconfig
make silentoldconfig
git checkout aa8032b
make allmodconfig
make silentoldconfigSince HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
but then was set to 'y' by the second allmodconfig. Then the second
silentoldconfig prints the warning.The warning in this case is a spurious warning, which happens at the time
kconfig tries to detect symbols that have changed, to touch the empty
header files in include/config used for dependency-tracking by make.Silence the warning when we read the old auto.conf file, since it is
perfectly legit that a symbol changed type since the previous call.Thread in:
http://marc.info/?l=linux-pci&m=137569198904000&w=2Reported-by: Linus Torvalds
Signed-off-by: "Yann E. MORIN"
Cc: Linus Torvalds
Cc: Michal Marek
Cc: Thomas Petazzoni
Cc: Bjorn Helgaas
Cc: Yinghai Lu
Cc: Benjamin Herrenschmidt
26 Jun, 2013
1 commit
-
This reverts commit 8357b48549e17b3e4e402c7f977b65708922e60f.
It breaks more stuff than it fixes.
Reported-by: Fengguang Wu
Reported-by: Sedat Dilek
Signed-off-by: "Yann E. MORIN"
Cc: Fengguang Wu
Cc: Sedat Dilek
Cc: Sam Ravnborg
Cc: Stephen Rothwell
Cc: Alexandre Bounine
Cc: Matt Porter
Signed-off-by: Michal Marek
25 Jun, 2013
2 commits
-
Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
is specified.For example, given those two files (Thomas' test-case):
---8
Signed-off-by: "Yann E. MORIN"
Cc: Thomas Petazzoni
Cc: Michal Marek
Cc: Sam Ravnborg
Cc: Sedat Dilek
Cc: Arnd Bergmann
Cc: Stephen Rothwell---
Changes v3 -> v4
- fix previous issue where some choices would not be set, which would
cause silentoldconfig to ask for them and was then breaking this
workflow (as reported by Arnd and Sedat):
KCONFIG_ALLCONFIG=foo.defconfig make randconfig
make silentoldconfig /dev/null 2>&1
make silentoldconfig /dev/null 2>&1 || break
done
which did not break at all.
- change done in v3 (below) is already fixed by a previous patchChanges v2 -> v3
- ensure only one symbol is set in a choiceChanges v1 -> v2:
- further postpone setting that a choice has a value until
one is indeed set
- do not print symbols that are part of an invisible choice -
Because of choice-in-a-choice constructs, it can happen that not all
symbols are assigned a value during randconfig, leading in rare cases
to this situation:---8 2. B (B)
3. C (C)
choice[1-3]: 2
E/F
> 1. E (E) (NEW)
2. F (F) (NEW)
choice[1-2]: aborted!Console input/output is redirected. Run 'make oldconfig' to update
configuration.Fix this by looping in randconfig for as long as some symbol gets assigned
a value.Note: this was spotted with the USB EHCI Debug Device Gadget (USB_G_DBGP),
which uses this choice-in-a-choice construct, and exhibits this problem.
The example above is just a stripped-down minimalist test-case.Signed-off-by: "Yann E. MORIN"
19 Jun, 2013
1 commit
-
Currently, randconfig may set more than one symbol in a given choice.
Given this config file:
config A
bool "A"
if A
choice
bool "B/C/D"
config B
bool "B"
config C
bool "C"
config D
bool "D"
endchoice
endif # AThen randconfig generates such .config files (case where A is not set is not
shown below for brevity), and where only the right-most .config is valid:
CONFIG_A=y CONFIG_A=y CONFIG_A=y
CONFIG_B=y CONFIG_B=y CONFIG_B=y
CONFIG_C=y # CONFIG_C is not set # CONFIG_C is not set
# CONFIG_D is not set CONFIG_D=y # CONFIG_D is not setThat is, in a randomised choice, the first symbol is always selected,
and at most one other symbol may be selected.This is due to symbol randomised in a choice not being properly flagged
as having a value.Fix that by flagging those symbols adequately: have a user-defined value,
and be not valid (to force recalculation of the symbol).Note: if the choice is not conditional, then the randomisation is properly
done.Reported-by: Matthieu CASTET
Signed-off-by: Matthieu CASTET
[yann.morin.1998@free.fr: independently re-done the same patch as Matthieu,
as pointed out by Sedat]
Cc: Arnaud Lacombe
Cc: Sedat Dilek
Signed-off-by: "Yann E. MORIN"
16 Jun, 2013
1 commit
-
The defconfig and Kconfig combination below, which is based on 3.10-rc4
Kconfigs, resulted in several options getting set to "m" instead of "y".defconfig.choice:
---8
[yann.morin.1998@free.fr: add the resulting .config to commit log,
remove unneeded USB_GADGET from the defconfig]
Tested-by: "Yann E. MORIN"
Reviewed-by: "Yann E. MORIN"
Signed-off-by: Yann E. MORIN
27 Apr, 2013
1 commit
-
This reverts commit 422c809f03f043d0950d8362214818e956a9daee.
It causes more harm than it solves issues.Reported-by: Sedat Dilek
Reported-by: Arnd Bergmann
Signed-off-by: "Yann E. MORIN"
Tested-by: Sedat Dilek
Cc: Sedat Dilek
Cc: Arnd Bergmann
Cc: Michal Marek
Cc: Sam Ravnborg
Cc: Stephen Rothwell
Cc: Thomas Petazzoni
Cc: Greg KH
25 Apr, 2013
4 commits
-
Currently the odds to set each symbol is (rounded):
booleans: y: 50% n: 50%
tristates: y: 33% m: 33% n: 33%Introduce a KCONFIG_PROBABILITY environment variable to tweak the
probabilities (in percentage), as such:
KCONFIG_PROBABILITY y:n split y:m:n split
-----------------------------------------------------------------
[1] unset or empty 50 : 50 33 : 33 : 34
[2] N N : 100-N N/2 : N/2 : 100-N
N:M N+M : 100-(N+M) N : M : 100-(N+M)
N:M:L N : 100-N M : L : 100-(M+L)[1] The current behaviour is kept as default, for backward compatibility
[2] The solution initially implemented by Peter for Buildroot, see:
http://git.buildroot.org/buildroot/commit/?id=3435c1afb5Signed-off-by: Peter Korsgaard
[yann.morin.1998@free.fr: add to Documentation/]
Signed-off-by: "Yann E. MORIN" -
Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
is specified.For example, given those two files (Thomas' test-case):
---8
Signed-off-by: "Yann E. MORIN"
Cc: Thomas Petazzoni
Cc: Michal Marek
Cc: Sam Ravnborg
Cc: Arnaud Lacombe---
Changes v2 -> v3
- ensure only one symbol is set in a choiceChanges v1 -> v2:
- further postpone setting that a choice has a value until
one is indeed set
- do not print symbols that are part of an invisible choice -
For randconfig, if a list of required symbols is specified with
KCONFIG_ALLCONFIG, such symbols do not "have a value" as per
sym_has_value(), but have the "valid" flag set.Signed-off-by: "Yann E. MORIN"
-
Because the modules' symbole (CONFIG_MODULES) may not yet be set when
we check a symbol's tristate capabilty, we'll always find that tristate
symbols are booleans, even if we randomly decided that to enable modules:
sym_get_type(sym) always return boolean for tristates when modules_sym
has not been previously set to 'y' *and* its value calculated *and* its
visibility calculated, both of which only occur after we randomly assign
values to symbols.Fix that by looking at the raw type of symbols. Tristate set to 'm' will
be promoted to 'y' when their values will be later calculated.Signed-off-by: "Yann E. MORIN"
14 Jul, 2012
1 commit
-
For some config options (CONFIG_EXTRA_FIRMWARE, for example), the length
of a config file line can exceed the 1024 byte buffer.Switch from fgets to compat_getline to fix. compat_getline is an
internally implimented getline work-alike for portability purposes.Signed-off-by: Cody Schafer
Signed-off-by: Michal Marek
13 Apr, 2012
2 commits
-
We've now fixed IS_ENABLED() and friends to not require any special
"__enabled_" prefixed versions of the normal Kconfig options, so delete
the last traces of them being generated.Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Torvalds -
This reverts commit 953742c8fe8ac45be453fee959d7be40cd89f920.
Dumping two lines into autoconf.h for all existing Kconfig options
results in a giant file (~16k lines) we have to process each time we
compile something. We've weaned IS_ENABLED() and similar off of
requiring the __enabled_ definitions so now we can revert the change
which caused all the extra lines.Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Torvalds
26 Jan, 2012
1 commit
-
Running `oldconfig' after any of the following configuration change:
either trivial addition, such as:
config A
bool "A"choice
prompt "Choice ?"
depends on Aconfig CHOICE_B
bool "Choice B"config CHOICE_C
bool "Choice C"
endchoiceor more tricky change:
OLD KCONFIG | NEW KCONFIG
|
| config A
| bool "A"
|
choice | choice
prompt "Choice ?" | prompt "Choice ?"
|
config CHOICE_C | config CHOICE_C
bool "Choice C" | bool "Choice C"
|
config CHOICE_D | config CHOICE_D
bool "Choice D" | bool "Choice D"
endchoice |
| config CHOICE_E
| bool "Choice E"
| depends on A
| endchoicewill not cause the choice to be considered as NEW, and thus not be
asked. The cause of this behavior is that choice's novelty are computed
statically right after the saved configuration has been read. At this
point, the new dependency's value is still unknown and asserted to be
`no'. Moreover, no update to this decision is made afterward.Correct this by dynamically evaluating a choice's novelty, and removing the
static evaluation.Reported-and-tested-by: Uwe Kleine-König
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
19 Dec, 2011
1 commit
-
Use the xfwrite wrapper function defined in lkc.h to check the return value of
fwrite and silence these warnings.HOSTCC scripts/kconfig/zconf.tab.o
scripts/kconfig/zconf.tab.c: In function 'header_print_comment':
/usr/src/lto/scripts/kconfig/confdata.c:551:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/zconf.tab.c: In function 'kconfig_print_comment':
/usr/src/lto/scripts/kconfig/confdata.c:467:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_resultSigned-off-by: Peter Foley
Signed-off-by: Michal Marek
30 Aug, 2011
1 commit
-
__enabled_ are only generated on visible or selected entries, do not
reflect the purpose of its introduction.Fix this by always generating these entries for named symbol.
Reported-by: Rabin Vincent
Signed-off-by: Arnaud Lacombe
30 Jul, 2011
1 commit
-
Replace the config_is_*() macros with a variant that allows for grepping
for usage of CONFIG_* options in the code. Usage:if (IS_ENABLED(CONFIG_NUMA))
or
#if IS_ENABLED(CONFIG_NUMA)
The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
the option is 'm'. Only boolean and tristate options are supported.Reviewed-by: Arnaud Lacombe
Acked-by: Randy Dunlap
Signed-off-by: Michal Marek
18 Jul, 2011
1 commit
-
The specialized printer for headers (espectially autoconf.h) is missing
fixup code for S_HEX symbol's "0x" prefix. As long as kconfig does not
warn for such missing prefix, this code is needed. Fix this.In the same time, fix some nits in `header_print_symbol()'.
Cc: Randy Dunlap
Cc: Mauro Carvalho ChehabBroken-by: Arnaud Lacombe
Reported-by: Randy Dunlap
Reported-by: Mauro Carvalho Chehab
Acked-by: Mauro Carvalho Chehab
Acked-by: Randy Dunlap
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
01 Jul, 2011
1 commit
-
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
functionsSigned-off-by: Arnaud Lacombe
[mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
macro)]
Signed-off-by: Michal Marek
09 Jun, 2011
1 commit
07 Jun, 2011
4 commits
-
This interface is not (and has never been ?) used by any frontend, just get rid
of it.Signed-off-by: Arnaud Lacombe
-
This header is needed when using va_{start,end,copy}(3) functions family.
Signed-off-by: Arnaud Lacombe
-
Cc: Sam Ravnborg
Signed-off-by: Arnaud Lacombe -
Signed-off-by: Arnaud Lacombe
25 May, 2011
1 commit
-
For strings and integers, the config_is_xxx macros are useless and
sometimes misleading:#define CONFIG_INITRAMFS_SOURCE ""
#define config_is_initramfs_source() 1Cc: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Michal Marek
24 May, 2011
2 commits
-
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
17 May, 2011
1 commit
-
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_MODULEand now let the compiler remove the non usefull code and not the
pre-processoras done in the mach-types for arm as exmaple
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
Acked-by: Andi Kleen
Signed-off-by: Michal Marek
18 Apr, 2011
1 commit
-
Timestamps in file data are useless and there is already one in .config
Signed-off-by: Michal Marek
15 Dec, 2010
3 commits
-
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek -
Replacing S_TRISTATE by S_BOOLEAN is a no-op for conf_write_symbol().
Signed-off-by: Arnaud Lacombe
[mmarek: Fix unused variable warning in conf_write()]
Signed-off-by: Michal Marek -
AUTOCONF_INCLUDED is not checked is not used within the tree and its parent
header, `autoconf.h', is safe to be re-included.Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
28 Oct, 2010
1 commit
-
Conflicts:
scripts/kconfig/nconf.c
04 Oct, 2010
1 commit
-
This prevents the buffers being overflowed when using a config
file with a long name. PATH_MAX is used elsewhere in the same
file, so use it here as well.Signed-off-by: Will Newton
Acked-by: WANG Cong
Signed-off-by: Michal Marek
01 Oct, 2010
1 commit
-
commit 8baefd30b5b0101aa07aa75da44a9eee881eed28 of linux-next replaced
a `switch()' statement with some `if()' statements, but left `break's
in the `switch()' statement untouched. This cause read config loop to
exit and so "make oldconfig" is not much usable (see below).> $ make oldconfig
>
> scripts/kconfig/conf --oldconfig Kconfig
> #
> # using defaults found in /boot/config-2.6.34-ccs-r1
> #
> *
> * Restart config...
> *
> *
> * General setup
> *
> Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)(I've already have "CONFIG_EXPERIMENTAL=y" in the old config file. But
that's not read here.)This patch should fix this problem.
Signed-off-by: Naohiro Aota
Signed-off-by: Michal Marek