24 Mar, 2008

1 commit

  • The module alias support in the kernel have a consistency
    check where it is checked that the size of a structure
    in the kernel and on the build host are the same.
    For cross builds this check does not make sense so detect
    when we do cross builds and silently skip the check in these
    situations.
    This fixes a build bug for a wireless driver when cross building
    for arm.

    Acked-by: Michael Buesch
    Tested-by: Gordon Farquharson
    Signed-off-by: Sam Ravnborg
    Cc: stable@kernel.org

    Sam Ravnborg
     

14 Mar, 2008

1 commit

  • Honor the environment variable "KBUILD_VERBOSE=1" (as set by make V=1) to
    enable verbose mode in scripts/kernel-doc. Useful for getting more info and
    warnings from kernel-doc.

    Signed-off-by: Randy Dunlap
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

05 Mar, 2008

1 commit

  • This version brings a number of minor fixes updating the type detector and
    the unary tracker. It also brings a few small fixes for false positives.
    It also reverts the --file warning. Of note:

    - limit CVS checks to added lines
    - improved type detections
    - fixes to the unary tracker

    Andy Whitcroft (13):
    Version: 0.15
    EXPORT_SYMBOL checks need to accept array variables
    export checks must match DECLARE_foo and LIST_HEAD
    possible types: cleanup debugging missing line
    values: track values through preprocessor conditional paths
    typeof is actually a type
    possible types: detect definitions which cross lines
    values: include line numbers on value debug information
    values: ensure we find correctly record pending brackets
    values: simplify the brace history stack
    CVS keyword checks should only apply to added lines
    loosen spacing for comments
    allow braces for single statement blocks with multiline conditionals

    Harvey Harrison (1):
    checkpatch: remove fastcall

    Ingo Molnar (1):
    checkpatch.pl: revert wrong --file message

    Uwe Kleine-Koenig (1):
    fix typo "goot" -> "good"

    Signed-off-by: Andy Whitcroft
    Cc: Randy Dunlap
    Cc: Joel Schopp
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     

24 Feb, 2008

1 commit

  • When running "make htmldocs" I'm seeing some non-fatal perl errors caused
    by trying to parse the callback function definitions in blk-core.c.

    The errors are "Use of uninitialized value in concatenation (.)..."
    in combination with:
    Warning(linux-2.6.25-rc2/block/blk-core.c:1877): No description found for parameter ''

    The function pointers are defined without a * i.e.
    int (drv_callback)(struct request *)

    The compiler is happy with them, but kernel-doc isn't.

    This patch teaches create_parameterlist in kernel-doc to parse this type of
    function pointer definition, but is it the right way to fix the problem ?
    The problem only seems to occur in blk-core.c.

    However with the patch applied, kernel-doc finds the correct parameter
    description for the callback in blk_end_request_callback, which is doesn't
    normally.

    I thought it would be a bit odd to change to code to use the more normal
    form of function pointers just to get the documentation to work, so I fixed
    kernel-doc instead - even though this is teaching it to understand code
    that might go away (The comment for blk_end_request_callback says that it
    should not be used and will removed at some point).

    Signed-off-by: Richard Kennedy
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Kennedy
     

20 Feb, 2008

1 commit

  • XXXINIT_TO_INIT and XXXEXIT_TO_EXIT warnings use the reversed symbol name order
    in the suggestion, e.g.:

    WARNING: vmlinux.o(.meminit.text+0x36c): Section mismatch in reference from the function free_area_init_core() to the function .init.text:setup_usemap()
    The function __meminit free_area_init_core() references
    a function __init setup_usemap().
    If free_area_init_core is only used by setup_usemap then
    annotate free_area_init_core with a matching annotation.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Sam Ravnborg

    Geert Uytterhoeven
     

19 Feb, 2008

1 commit


15 Feb, 2008

1 commit

  • fastcall is gone from the tree, no need to adjust the function prototypes
    anymore for this.

    Signed-off-by: Harvey Harrison
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

14 Feb, 2008

2 commits

  • This adds some new magic in the MODPOST phase for CONFIG_MARKERS. Analogous
    to the Module.symvers file, the build will now write a Module.markers file
    when CONFIG_MARKERS=y is set. This file lists the name, defining module, and
    format string of each marker, separated by \t characters. This simple text
    file can be used by offline build procedures for instrumentation code,
    analogous to how System.map and Module.symvers can be useful to have for
    kernels other than the one you are running right now.

    The strings are made easy to extract by having the __trace_mark macro define
    the name and format together in a single array called __mstrtab_* in the
    __markers_strings section. This is straightforward and reliable as long as
    the marker structs are always defined by this macro. It is an unreasonable
    amount of hairy work to extract the string pointers from the __markers section
    structs, which entails handling a relocation type for every machine under the
    sun.

    Mathieu :
    - Ran through checkpatch.pl

    Signed-off-by: Roland McGrath
    Signed-off-by: Mathieu Desnoyers
    Cc: David Smith
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • > The attached .config (with current -git) results in a compile
    > error since it contains:
    >
    > CONFIG_X86=y
    > # CONFIG_EMBEDDED is not set
    > CONFIG_SERIO=m
    > CONFIG_SERIO_I8042=y
    >
    > Looking at drivers/input/serio/Kconfig I simply don't get how this
    > can happen.

    You've hit the rather subtle rules of select vs default. What happened is
    that SERIO is selected to m, but SERIO_I8042 isn't selected so the default
    of y is used instead.
    We already had the problem in the past that select and default don't work
    well together, so this patch cleans this up and makes the rule hopefully
    more straightforward. Basically now the value is calculated like this:

    (value && dependency) || select

    where the value is the user choice (if available and the symbol is
    visible) or default.

    In this case it means SERIO and SERIO_I8042 are both set to y due to their
    default and if SERIO didn't had the default, then the SERIO_I8042 value
    would be limited to m due to the dependency.

    I tested this patch with more 10000 random configs and above case is the
    only the difference that showed up, so I hope there is nothing that
    depended on the old more complex and subtle rules.

    Signed-off-by: Roman Zippel
    Tested-by: Adrian Bunk
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     

12 Feb, 2008

1 commit

  • When make -s support were added to filechk to
    combination created with make V=1 were not
    covered.
    Fix it by explicitly cover this case too.

    Signed-off-by: Sam Ravnborg
    Cc: Mike Frysinger

    Sam Ravnborg
     

09 Feb, 2008

7 commits

  • If CONIFIG_LOCALVERSION is set for example to -loop, the following error
    message was generated.

    dpkg-deb - error: Debian revision (`loop') doesn't contain any digits
    dpkg-deb: 1 errors in control file

    The patch solves this by adding a numeric revision to package version.

    Signed-off-by: Michal Sojka
    Signed-off-by: Sam Ravnborg

    Michal Sojka
     
  • Signed-off-by: Mike Frysinger
    Signed-off-by: Sam Ravnborg

    Mike Frysinger
     
  • modpost: Use warn() for announcing section mismatches, for easy grepping for
    warnings in build logs.

    Also change an existing call from fprintf() to warn() while we're at it.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Sam Ravnborg

    Geert Uytterhoeven
     
  • Signed-off-by: Uwe Kleine-König
    Signed-off-by: Sam Ravnborg

    Uwe Kleine-König
     
  • If we cannot determine the symbol then print
    (unknown) to hint the reader that we failed to
    find the symbol.
    This happens with REL relocation records
    in arm object files.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • This version brings the remainder of the queued fixes. A number of fixes
    for items missed reported by Andrew Morton and others. Also a handful
    of new checks and fixes for false positives. Of note:

    - new warning associated with --file to try and avoid cleanup only patches,
    - corrected handling of completly empty files,
    - corrected report handling with multiple files,
    - handling of possible types in the face of multiple declarations,
    - detection of unnessary braces on complex if statements (where present), and
    - all new comment spacing handling.

    Andi Kleen (1):
    Introduce a warning when --file mode is used

    Andy Whitcroft (14):
    Version: 0.14
    clean up some space violations in checkpatch.pl
    a completly empty file should not provoke a whinge
    reset report lines buffers between files
    unary ++/-- may abutt close braces
    __typeof__ is also unary
    comments: revamp comment handling
    add --summary-file option adding filename to summary line
    trailing backslashes are not trailing statements
    handle operators passed as parameters such as to ASSERTCMP
    possible types -- enhance debugging
    check for boolean operations with constants
    possible types: handle multiple declarations
    detect and report if statements where all branches are single statements

    Arjan van de Ven (1):
    quiet option should not print the summary on no errors

    Bartlomiej Zolnierkiewicz (1):
    warn about using __FUNCTION__

    Timur Tabi (1):
    loosen spacing checks for __asm__

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • This version brings a large number of fixes which have built up over
    the Christmas period. Mostly these are fixes for false positives, both
    through improvments to unary checks and possible type detection. It
    also brings new checks for while location and CVS keywords. Of note:

    - a number of fixes to unary detection
    - detection of a number of new forms of types to improve type matching
    - better inline handling
    - recognision of '%' as an operator

    Andy Whitcroft (28):
    Version: 0.13
    unary detection: maintain bracket state across lines
    move to pre-sanitising the entire file
    the text of a #error statement should be treated like it is in quotes
    line sanitisation needs to target double backslash correctly
    tighten comment guestimation for lines starting ' * '
    debug: add a debug framework
    prevent unclosed single quotes from spreading
    add % as an operator
    the text of a #warning statement should be treated like it is in quotes
    possible matching applies in typedefs
    single statement block checks must not trigger when two or more statements
    possible types: local variables may also be const
    treat inline as a type attribute to even when out of place
    possible types: sparse annotations are valid indicators
    possible types: beef up the possible type testing
    check for hanging while statements on the wrong line
    utf8 checks need to occur against the raw lines
    function brace checks should use any whitespece matches
    comments should take up space in the line when sanitised
    remove debugging from if assignment checks
    possible types -- ensure we detect all pointer casts
    fix tests for function spacing in the presence of #define
    clean up the UTF-8 error message to be clearer
    test-lib: invert the status report, output success counts
    detect and report CVS keywords
    tests: break out tests
    Add $Id$ to the CVS keyword checks

    Benny Halevy (1):
    checkpatch.pl: recognize the #elif preprocessor directive

    Geert Uytterhoeven (1):
    print the filenames of patches where available

    Mauro Carvalho Chehab (1):
    Fix missing \n in checkpatch.pl

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     

08 Feb, 2008

3 commits

  • Make kernel-doc warn when a function/struct/union/typedef does not contain
    a properly formatted short description, such as:
    * scsi_devinfo: set up the dynamic device list
    or
    * scsi_devinfo -

    This warning is only generated when verbose (-v) mode is used.

    Also explain the -v command line option in the -h output.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Prevent duplicate output of a Description: section when there is a "blank"
    ("*") line between the initial function name/description line and the
    "Description:" header.

    Test case: drivers/scsi/scsi_devinfo.c::scsi_init_devinfo().

    Rob Landley hit this while he was producing SCSI kernel-doc.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Fix kernel-doc function prototype parsing which was exposed by vunmap() by
    allowing more than one '*' before the function name.

    Error(linux-2.6.24-mm1//mm/vmalloc.c:438): cannot understand prototype: 'struct page **vunmap(const void *addr) '

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

07 Feb, 2008

3 commits

  • I have been prime author and maintainer of block2mtd from day one, but
    neither MAINTAINERS nor the module source makes this fact clear. And while
    I'm at it, update my email addresses tree-wide, as the old address
    currently bounces and change my name to "joern" as unicode will likely
    continue to cause trouble until the end of this century.

    Signed-off-by: Joern Engel
    Cc: David Woodhouse
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joern Engel
     
  • When resolving symbol names from addresses with aliased symbol names,
    kallsyms_lookup always returns the first symbol, even if it is a weak
    symbol.

    This patch changes this by sorting the symbols with the weak symbols last
    before feeding them to the kernel. This way the kernel runtime isn't
    changed at all, only the kallsyms build system is changed.

    Another side effect is that the symbols get sorted by address, too. So,
    even if future binutils version have some bug in "nm" that makes it fail to
    correctly sort symbols by address, the kernel won't be affected by this.

    Mathieu says:

    I created a module in LTTng that uses kallsyms to get the symbol
    corresponding to a specific system call address. Unfortunately, all the
    unimplemented syscalls were all referring to the (same) weak symbol
    identifying an unrelated system call rather that sys_ni (or whatever
    non-weak symbol would be expected). Kallsyms was dumbly returning the first
    symbol that matched.

    This patch makes sure kallsyms returns the non-weak symbol when there is
    one, which seems to be the expected result.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Mathieu Desnoyers
    Looks-great-to: Rusty Russell
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paulo Marques
     
  • When passing a zero address to kallsyms_lookup(), the kernel thought it was
    a valid kernel address, even if it is not. This is because is_ksym_addr()
    called is_kernel_extratext() and checked against labels that don't exist on
    many archs (which default as zero). Since PPC was the only kernel which
    defines _extra_text, (in 2005), and no longer needs it, this patch removes
    _extra_text support.

    For some history (provided by Jon):
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robin Getz
    Cc: David Woodhouse
    Cc: Jon Loeliger
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Getz
     

03 Feb, 2008

5 commits


02 Feb, 2008

1 commit

  • Some crazy devices in the wild have a vendor id of 0x0000. If we try to
    add a module alias with this id, we just can't do it due to a check in
    the file2alias.c file. Change the test to verify that both the vendor
    and product ids are 0x0000 to show a real "blank" module alias.

    Note, the module-init-tools package also needs to be changed to properly
    generate the depmod tables.

    Cc: Janusz
    Cc: stable
    Cc: Jon Masters
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Jan, 2008

11 commits

  • If there is a mixture of specifying sections for code in gcc
    and assembler then if the assembler code do not add
    the "ax" flags the linker will see this as two different sections
    and generate unique sections for each. ld does so by adding a dot
    and a number.
    Teach modpost to warn if a section shows up that match this
    pattern - but do this only for non-debug sections.

    It will result in warnings like this:

    WARNING: vmlinux.o (.sched.text.1): unexpected section name.
    The (.[number]+) following section name are ld generated and not expected.
    Did you forget to use "ax"/"aw" in a .S file?
    Note that for example contains
    section definitions for use in .S files.

    All warnings seen with a defconfig build for:
    x86 (32+64bit) and sparc64 has been fixed (via respective maintainers).

    arm, powerpc (64 bit), s390 (32 bit), ia64, alpha, sh4 checked - no
    warnings seen with a defconfig build.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • If the config option CONFIG_SECTION_MISMATCH is not set and
    we see a Section mismatch present the following to the user:

    modpost: Found 1 section mismatch(es).
    To see additional details select "Enable full Section mismatch analysis"
    in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).

    If the option CONFIG_SECTION_MISMATCH is selected
    then be verbose in the Section mismatch reporting from mdopost.
    Sample outputs:

    WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
    The function discover_ebda() references
    the variable __initdata ebda_addr.
    This is often because discover_ebda lacks a __initdata
    annotation or the annotation of ebda_addr is wrong.

    WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
    The variable pci_serial_quirks references
    the function __devexit pci_plx9050_exit()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
    The symbol arch_register_cpu is exported and annotated __cpuinit
    Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Change kconfig behavior so that mixing bool and tristate config
    settings in a choice is possible and has the desired effect of offering
    just the tristate options individually if the choice gets set to M, and
    a normal boolean selection if the choice gets set to Y.

    Also fix scripts/kconfig/conf's handling of children of choice values -
    there may be more than one immediate child, and all of them need to be
    processed.

    Signed-off-by: Jan Beulich
    Cc: "Roman Zippel"
    Signed-off-by: Sam Ravnborg

    Jan Beulich
     
  • Remove the deprecated __attribute_used__.

    [Introduce __section in a few places to silence checkpatch /sam]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • Signed-off-by: Daniel De Graaf
    Signed-off-by: Sam Ravnborg

    Daniel De Graaf
     
  • Kconfig had a synonym "enable" for "select" that was neither documented
    nor used.

    Signed-off-by: Adrian Bunk
    Cc: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • Refactor code so the warning report function
    does nothing else than reporting warnings.
    As a side effect some other code paths were cleaned
    up by this.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Introducing helpers to retreive symbol and section
    names cleaned up the code a bit.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • The typical layout is now:
    WARNING: vmlinux.o(.text+0x372ec): Section mismatch: reference to .devinit.text:pci_scan_one_pbm in 'psycho_scan_bus'

    This is first step towards more readable warnings.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Setting the option DEBUG_SECTION_MISMATCH will
    report additional section mismatch'es but this
    should in the end makes it possible to get rid of
    all of them.

    See help text in lib/Kconfig.debug for details.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Introducing separate sections for __dev* (HOTPLUG),
    __cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG)
    allows us to do a much more reliable Section mismatch
    check in modpost. We are no longer dependent on the actual
    configuration of for example HOTPLUG.

    This has the effect that all users see much more
    Section mismatch warnings than before because they
    were almost all hidden when HOTPLUG was enabled.
    The advantage of this is that when building a piece
    of code then it is much more likely that the Section
    mismatch errors are spotted and the warnings will be
    felt less random of nature.

    Signed-off-by: Sam Ravnborg
    Cc: Greg KH
    Cc: Randy Dunlap
    Cc: Adrian Bunk

    Sam Ravnborg