03 Feb, 2017

1 commit


19 Jan, 2017

1 commit


28 Oct, 2016

1 commit


28 Aug, 2016

5 commits


27 Aug, 2016

1 commit


19 Aug, 2016

1 commit


02 May, 2016

1 commit


15 Dec, 2015

2 commits

  • Add support to find string-similar symbols. When option --sim SYM is
    specified, checkkconfigsymbols.py will print at most 10 symbols defined
    in Kconfig that are string similar to SYM in the following format:
    Similar symbols: $COMMA_SEPARATED_LIST_OF_SYMBOLS

    Note, if no similar symbols are found it is indicated as follows:
    Similar symbols: no similar symbols found

    Since the implemented functionality is also useful when searching the
    entire source or when diffing two commits, a list of similar symbols is
    printed unconditionally with the other data. In order to make the
    output more readable, the format now looks as follows:

    $UNDEFINED_SYMBOL
    Referencing files: $COMMA_SEPARATED_LIST_OF_FILES
    Similar symbols: $COMMA_SEPARATED_LIST_OF_SYMBOLS
    [Optional with '--find']
    Commits changing symbol:
    - $COMMIT_1_HASH ("$COMMIT_1_MESSAGE")
    - $COMMIT_2_HASH ("$COMMIT_2_MESSAGE")
    or
    - no commit found

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     
  • Distribute the parsing of source and Kconfig files on all available
    cores to speed up processing.

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     

04 Aug, 2015

3 commits

  • Until now, checkkonfigsymbols.py did not check default statements for
    references on missing Kconfig symbols (i.e., undefined Kconfig options).
    Hence, add support to parse and check the Kconfig default statement.

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     
  • Color output to make it more readable. Symbols will be printed yellow,
    relevant commits (see --find) red.

    Signed-off-by: Valentin Rothberg
    Acked-by: Stefan Hengelein
    Acked-by: Andreas Ruprecht
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     
  • Add option -f/--find to find relevant commits when using the --diff
    option. --find is useful in case a user wants to check commits that
    potentially cause a Kconfig symbol to be missing. This is done via 'git
    log -G $SYMBOL' (i.e., to get a list of commits that change $SYMBOL).
    The relevant commits are printed below the "SYMBOL\tFILES" line,
    followed by an empty line to increase readability.

    Signed-off-by: Valentin Rothberg
    Acked-by: Stefan Hengelein
    Acked-by: Andreas Ruprecht
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     

25 May, 2015

2 commits


24 Mar, 2015

1 commit

  • Commit b1a3f243485f ("checkkconfigsymbols.py: make it Git aware")
    mistakenly removed to print undefined Kconfig symbols in alphabetical
    order. Furthermore, the script does not print anything anymore when the
    entire tree is checked (i.e., when no commit is specified).

    This patch restores the sorted output and adds the missing print for the
    default case. Additionally, the file lists are now sorted as well which
    (a) makes it easier to read and (b) makes the output deterministic.

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     

17 Mar, 2015

1 commit

  • The script now supports to check a specified commit or a specified range
    of commits (i.e., commit1..commit2). Developers and maintainers are
    encouraged to use this functionality before sending or merging patches
    to avoid potential bugs and to keep the code, documentation, etc. clean.

    This patch adds the following options to the script:

    -c COMMIT, --commit=COMMIT
    Check if the specified commit (hash) introduces
    undefined Kconfig symbols.

    -d DIFF, --diff=DIFF
    Diff undefined symbols between two commits. The input
    format bases on Git log's 'commmit1..commit2'.

    --force Reset current Git tree even when it's dirty.

    Note that the first two options require to 'git reset --hard' the user's
    Git tree. This hard reset is necessary to keep the script fast, but it
    can lead to the loss of uncommitted data. Hence, the script aborts in
    case it is executed in a dirty tree. It won't abort if '--force' is
    passed.

    If neither -c nor -d is specified, the script defaults to check the
    entire local tree (i.e., the previous behavior).

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     

10 Mar, 2015

1 commit

  • Recent changes to the build system of tools suggest to filter reports
    for the entire tools directory. Various C preprocessor identifiers are
    prefixed with CONFIG_ but are NOT defined in Kconfig but in Makefiles in
    the tools directory. Such identifiers are false positives for most static
    analysis tools (i.e., scripts/checkkconfigsymbols.py) since the CONFIG_
    prefix and the _MODULE suffix is reserved for Kconfig features in CPP
    and Make syntax.

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     

09 Nov, 2014

1 commit

  • This patch improves the detection of defects by updating the
    regular expression to find Kconfig identifiers in the source
    code, and fixes some cases of false positives. The following
    changes are made:
    - improve regex to find Kconfig identifiers in the source
    - exclude .log files from analysis
    - improve filtering of false positives (e.g, CONFIG_XXX)
    - change output format from (feature:\tlist) to (feature\tlist)

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     

08 Nov, 2014

1 commit

  • The scripts/checkkconfigsymbols.sh script searches Kconfig features
    in the source code that are not defined in Kconfig. Such identifiers
    always evaluate to false and are the source of various kinds of bugs.
    However, the shell script is slow and it does not detect such broken
    references in Kbuild and Kconfig files (e.g., ``depends on UNDEFINED´´).
    Furthermore, it generates false positives. The script is also hard to
    read and understand, and is thereby difficult to maintain.

    This patch replaces the shell script with an implementation in Python,
    which:
    (a) detects the same bugs, but does not report previous false positives
    (b) additionally detects broken references in Kconfig and all
    non-Kconfig files, such as Kbuild, .[cSh], .txt, .sh, defconfig, etc.
    (c) is up to 75 times faster than the shell script
    (d) only checks files under version control

    The new script reduces the runtime on my machine (i7-2620M, 8GB RAM, SSD)
    from 3m47s to 0m3s, and reports 938 broken references in Linux v3.17-rc1;
    419 additional reports of which 16 are located in Kconfig files,
    287 in defconfigs, 63 in ./Documentation, 1 in Kbuild.

    Moreover, we intentionally include references in comments, which have been
    ignored until now. Such comments may be leftovers of features that have
    been removed or renamed in Kconfig (e.g., ``#endif /* CONFIG_MPC52xx */´´).
    These references can be misleading and should be removed or replaced.

    Note that the output format changed from (file list feature) to
    (feature file list) as it simplifies the detection of the Kconfig
    feature for long file lists.

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Stefan Hengelein
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg