11 Jan, 2012

16 commits

  • Fix up type and cast spacing checks such that all occurences on a line are
    examined and reported. For example the line below has a valid cast and a
    bad type, but currently we check the cast first which is good and stop:

    u16* bar = (u16 *)baz;

    We will also only report one of the errors in this example:

    u16* bar = (u16*)bad;

    Move to iterating across all casts and all types, reporting any failure.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • typeof may have various more complex forms as its arguement, not just an
    identifier. For now allow us to leak to the first close perenthesis ')'.

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Ensure the cast type is unique in the context parser, we do not want them
    to detect as a comma ','.

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • We are incorrectly matching square brackets '[' and ']' leading to false
    positives on more complex functions as below:

    return (dt3155_fbuffer[m]->ready_head -
    dt3155_fbuffer[m]->ready_len +
    dt3155_fbuffer[m]->nbuffers)%
    (dt3155_fbuffer[m]->nbuffers);

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • It is common to stub out a function as below, this is triggering a complex
    macro format incorrectly. Sort this out:

    #define cma_early_regions_reserve(reserve) do { } while (0)

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • The following fragment defeats the DEVICE_ATTR style handing, check for
    and ignore the close brace '}' in this context:

    int foo()
    {
    }
    DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
    ata_scsi_lpm_show, ata_scsi_lpm_put);
    EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • The intent of this check is to catch the options which the user will see
    and ensure they are properly described. It is also common for internal
    only options to have a brief description. Allow this form.

    Reported-by: Steven Rostedt
    Tested-by: Steven Rostedt
    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • In the middle of a long definition or similar, there is no possibility of
    finding a smaller sub-statement. Optimise this case by skipping statement
    aquirey where there are no starts of statement (open brace '{' or
    semi-colon ';'). We are likely to scan slightly more than needed still
    but this is safest.

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Inserting a # into the modifiers list will incorrectly add the null string
    to the modifiers list, leading to an infinite loop. As neither of these
    is a valid modifier form simply ignore them.

    Signed-off-by: Andy Whitcroft
    Reported-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Improve the checking of arguments to memset and min/max tests.

    Move the checking of min/max to statement blocks instead of single line.
    Change $Constant to allow any case type 0x initiator and trailing ul
    specifier. Add $FuncArg type as any function argument with or without a
    cast. Print the whole statement when showing memset or min/max messages.
    Improve the memset with 0 as 3rd argument error message.

    There are still weaknesses in the $FuncArg and $Constant code as arbitrary
    parentheses and negative signs are not generically supported.

    [akpm@linux-foundation.org: fix per Andy]
    Signed-off-by: Joe Perches
    Acked-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Move the memset checks over to work against the statement. Also add
    checks for 0 and 1 used as lengths. Generally these indicate badly
    ordered parameters.

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When looking for a statement we currently run on through preprocessor
    commands. This means that a header file with just definitions is parsed
    over and over again combining all of the lines from the current line to
    the end of file leading to severe performance issues.

    Fix up context accumulation to track preprocessor commands and stop when
    reaching the end of them. At the same time vastly simplify the #define
    handling.

    Signed-off-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Add a warn for not using __printf.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • email header lines can look like signature tags. It's valid to have
    multiple email recipients on a single line but not valid to have multiple
    signatures on a single line.

    Validate signatures only when not in the email headers.

    Clear the $in_commit_log flag when the patch filename appears.

    Add '-' to the valid chars in a message header for headers
    like "Message-Id:" and "In-Reply-To:".

    Signed-off-by: Joe Perches
    Reported-by: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • I happen to have had a commit to various network drivers since the big
    renaming/reorg which happened to drivers/net recently. This means that I
    now appear to be in the top few commit signers (by %age) for many of them
    so am getting sent all sorts of stuff and people who are involved with the
    driver are not. e.g. (to pick one at random):

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:5/7=71%)
    Ian Campbell (commit_signer:2/7=29%)
    Eric Dumazet (commit_signer:1/7=14%)
    Jeff Kirsher (commit_signer:1/7=14%)
    Jiri Pirko (commit_signer:1/7=14%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    With the following patch the renames are followed and the result appears
    much more sensible:

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:31/34=91%)
    Joe Perches (commit_signer:11/34=32%)
    Szymon Janc (commit_signer:5/34=15%)
    Jiri Pirko (commit_signer:3/34=9%)
    Paul (commit_signer:2/34=6%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    Signed-off-by: Ian Campbell
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Campbell
     

09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • …git-cur/linux-2.6-arm

    * 'amba-modalias' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
    sound: aaci: Enable module alias autogeneration for AMBA drivers
    watchdog: sp805: Enable module alias autogeneration for AMBA drivers
    fbdev: amba: Enable module alias autogeneration for AMBA drivers
    serial: pl011: Enable module alias autogeneration for AMBA drivers
    serial: pl010: Enable module alias autogeneration for AMBA drivers
    spi: pl022: Enable module alias autogeneration for AMBA drivers
    rtc: pl031: Enable module alias autogeneration for AMBA drivers
    rtc: pl030: Enable module alias autogeneration for AMBA drivers
    mmc: mmci: Enable module alias autogeneration for AMBA drivers
    input: ambakmi: Enable module alias autogeneration for AMBA drivers
    gpio: pl061: Enable module alias autogeneration for AMBA drivers
    dmaengine: pl330: Enable module alias autogeneration for AMBA drivers
    dmaengine: pl08x: Enable module alias autogeneration for AMBA drivers
    hwrng: nomadik: Enable module alias autogeneration for AMBA drivers
    ARM: amba: Auto-generate AMBA driver module aliases during modpost
    ARM: amba: Move definition of struct amba_id to mod_devicetable.h

    Linus Torvalds
     

19 Dec, 2011

1 commit

  • Commit 5c48b108 ("um: take arch/um/sys-x86 to arch/x86/um") broke the
    make target update-po-config, as its symlink trick (again) fails.
    (Previous breakage was fixed with commit bdc69ca4 ("kconfig: change
    update-po-config to reflect new layout of arch/um").)

    The new UML layout allows to drop the symlick trick entirely. And if,
    one day, another architecture supports UML too, that should now work
    without again breaking this make target.

    Signed-off-by: Paul Bolle
    Signed-off-by: Michal Marek

    Paul Bolle
     

22 Nov, 2011

1 commit

  • This patch adds the necessary support in file2alias.c to define
    suitable aliases based on the amba_id table in AMBA driver modules.

    This should be sufficient to allow such modules to be auto-loaded
    via udev. The AMBA bus driver's uevent hotplug code is also
    modified to pass an approriate MODALIAS string in the event.

    For simplicity, the AMBA ID is treated an an opaque 32-bit numeber.
    Module alises use patterns as appropriate to describe the value-
    mask pairs described in the driver's amba_id list.

    The proposed alias format is (extended regex):

    ^amba:d(HEX){8}$

    Where HEX is a single upper-case HEX digit or a pattern (? or []
    expression) matching a single upper-case HEX digit, as expected by
    udev.

    "d" is short for "device", following existing alias naming
    conventions for other device types. This adds some flexibility for
    unambiguously extending the alias format in the future by adding
    additional leading and trailing fields, if this turns out to be
    necessary.

    Signed-off-by: Dave Martin
    Acked-by: Pawel Moll

    Dave Martin
     

14 Nov, 2011

1 commit


07 Nov, 2011

4 commits

  • * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS
    tags, powerpc: Update tags.sh to support _GLOBAL symbols
    scripts: add extract-vmlinux

    Linus Torvalds
     
  • * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox
    scripts/kconfig/nconf: fix editing long strings
    scripts/kconfig/nconf: dynamically alloc dialog_input_result
    scripts/kconfig/nconf: fix memmove's length arg
    scripts/kconfig/nconf: fix typo: unknow => unknown
    kconfig: fix set but not used variables
    kconfig: handle SIGINT in menuconfig
    kconfig: fix __enabled_ macros definition for invisible and un-selected symbols
    kconfig: factor code in menu_get_ext_help()
    kbuild: Fix help text not displayed in choice option.
    kconfig/nconf: nuke unreferenced `nohelp_text'
    kconfig/streamline_config.pl: merge local{mod,yes}config
    kconfig/streamline_config.pl: use options to determine operating mode
    kconfig/streamline_config.pl: directly access LSMOD from the environment

    Linus Torvalds
     
  • * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Kbuild: append missing-syscalls to the default target list
    genksyms: Regenerate lexer and parser
    genksyms: Do not expand internal types
    genksyms: Minor parser cleanup
    Makefile: remove a duplicated line
    fixdep: fix extraneous dependencies
    scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement
    kbuild: prevent make from deleting _shipped files
    kbuild: Do not delete empty files in make distclean

    Linus Torvalds
     
  • Use of the GPL or a compatible licence doesn't necessarily make the code
    any good. We already consider staging modules to be suspect, and this
    should also be true for out-of-tree modules which may receive very
    little review.

    Signed-off-by: Ben Hutchings
    Reviewed-by: Dave Jones
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rusty Russell (patched oops-tracing.txt)

    Ben Hutchings
     

01 Nov, 2011

2 commits


30 Oct, 2011

1 commit


26 Oct, 2011

1 commit

  • * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1519 commits)
    staging: et131x: Remove redundant check and return statement
    staging: et131x: Mainly whitespace changes to appease checkpatch
    staging: et131x: Remove last of the forward declarations
    staging: et131x: Remove even more forward declarations
    staging: et131x: Remove yet more forward declarations
    staging: et131x: Remove more forward declarations
    staging: et131x: Remove forward declaration of et131x_adapter_setup
    staging: et131x: Remove some forward declarations
    staging: et131x: Remove unused rx_ring.recv_packet_pool
    staging: et131x: Remove call to find pci pm capability
    staging: et131x: Remove redundant et131x_reset_recv() call
    staging: et131x: Remove unused rx_ring.recv_buffer_pool
    Staging: bcm: Fix three initialization errors in InterfaceDld.c
    Staging: bcm: Fix coding style issues in InterfaceDld.c
    staging:iio:dac: Add AD5360 driver
    staging:iio:trigger:bfin-timer: Fix compile error
    Staging: vt6655: add some range checks before memcpy()
    Staging: vt6655: whitespace fixes to iotcl.c
    Staging: vt6656: add some range checks before memcpy()
    Staging: vt6656: whitespace cleanups in ioctl.c
    ...

    Fix up conflicts in:
    - drivers/{Kconfig,Makefile}, drivers/staging/{Kconfig,Makefile}:
    vg driver movement
    - drivers/staging/brcm80211/brcmfmac/{dhd_linux.c,mac80211_if.c}:
    driver removal vs now stale changes
    - drivers/staging/rtl8192e/r8192E_core.c:
    driver removal vs now stale changes
    - drivers/staging/et131x/et131*:
    driver consolidation into one file, tried to do fixups

    Linus Torvalds
     

11 Oct, 2011

3 commits


15 Sep, 2011

2 commits


09 Sep, 2011

6 commits

  • to make it easier to locate begin/end when editing long strings;

    Signed-off-by: Cheng Renquan
    Acked By: Nir Tzachar

    Cheng Renquan
     
  • The original dialog_inputbox doesn't work with longer than prompt_width
    strings, here fixed it in this way:
    1) add variable cursor_form_win to record cursor of form_win,
    keep its value always between [0, prompt_width-1];
    reuse the original cursor_position as cursor of the string result,
    use (cursor_position-cursor_form_win) as begin offset to show part of
    the string in form_win;

    Signed-off-by: Cheng Renquan
    Cc: Arnaud Lacombe
    Cc: Nir Tzachar

    Cheng Renquan
     
  • To support unlimited length string config items;

    No check for realloc return value keeps code simple, and to be
    consistent with other existing unchecked malloc in kconfig.

    Signed-off-by: Cheng Renquan
    Signed-off-by: Arnaud Lacombe

    Cheng Renquan
     
  • In case KEY_BACKSPACE / KEY_DC to delete a char, it memmove only
    (len-cursor_position+1) bytes;
    the default case is to insert a char, it should also memmove exactly
    (len-cursor_position+1) bytes;

    the original use of (len+1) is wrong and may access following memory
    that doesn't belong to result, may cause SegFault in theory;

    case KEY_BACKSPACE:
    if (cursor_position > 0) {
    memmove(&result[cursor_position-1],
    &result[cursor_position],
    len-cursor_position+1);
    cursor_position--;
    }
    break;
    case KEY_DC:
    if (cursor_position >= 0 && cursor_position < len) {
    memmove(&result[cursor_position],
    &result[cursor_position+1],
    len-cursor_position+1);
    }
    break;
    default:
    if ((isgraph(res) || isspace(res)) &&
    len-2 < result_len) {
    /* insert the char at the proper position */
    memmove(&result[cursor_position+1],
    &result[cursor_position],
    len-cursor_position+1);
    result[cursor_position] = res;
    cursor_position++;
    }

    Signed-off-by: Cheng Renquan
    Acked-by: Nir Tzachar

    Cheng Renquan
     
  • Signed-off-by: Cheng Renquan
    Acked-by: Arnaud Lacombe

    Cheng Renquan
     
  • The introduction of include/linux/kconfig.h created 3 extraneous
    dependencies:
    include/config/.h
    include/config/h.h
    include/config/foo.h

    Fix this by excluding kconfig.h from fixdep calculations.

    Signed-off-by: Peter Foley
    Signed-off-by: Michal Marek

    Peter Foley